Cet article présente principalement le tutoriel d'installation MySQL 5.6 sous Centos 6.5. Il est très bien et a une valeur de référence. Les amis qui en ont besoin peuvent s'y référer
1 .Téléchargez le package RPM correspondant à 2. Décompressez le package tartar -xvf MySQL-5.6.33-1.el6.x86_64.rpm-bundle.tar
rpm -ivh MySQL-server-5.6.33-1.el6.x86_64.rpm rpm -ivh MySQL-client-5.6.33-1.el6.x86_64.rpm rpm -ivh MySQL-devel-5.6.33-1.el6.x86_64.rpm
error: Failed dependencies: libaio.so.1()(64bit) is needed by MySQL-server-5.6.33-1.el6.x86_64 libaio.so.1(LIBAIO_0.1)(64bit) is needed by MySQL-server-5.6.33-1.el6.x86_64 libaio.so.1(LIBAIO_0.4)(64bit) is needed by MySQL-server-5.6.33-1.el6.x86_64
yum install libaio
error: Failed dependencies: libnuma.so.1()(64bit) is needed by MySQL-server-5.6.33-1.el6.x86_64 libnuma.so.1(libnuma_1.1)(64bit) is needed by MySQL-server-5.6.33-1.el6.x86_64 libnuma.so.1(libnuma_1.2)(64bit) is needed by MySQL-server-5.6.33-1.el6.x86_64
yum install numactl
/usr/bin/mysql_install_db service mysql start
cat /root/.mysql_secret #查看root账号密码 mysql> SET PASSWORD = PASSWORD('123456'); mysql> exit
mode sans échecDéfinir le mot de passe
service mysql stop mysqld_safe --skip-grant-tables& mysql -u root mysql mysql> UPDATE user SET password=PASSWORD("new password") WHERE user='root'; mysql> FLUSH PRIVILEGES;
mysql> use mysql; mysql> select host,user,password from user; mysql> update user set host='%' where user='root' and host='localhost'; mysql> flush privileges; mysql> exit
chkconfig mysql on chkconfig --list | grep mysql mysql 0:off 1:off 2:on 3:on 4:on 5:on 6:off
8. Commandes courantes
/var/lib/mysql/ #数据库目录 /usr/share/mysql #配置文件目录 /usr/bin #相关命令目录 /etc/init.d/mysql #启动脚本
1. Utilisez les outils clients pour vous connecter à la base de données
2. Afficher quelles bases de données sont incluses dans le serveur MySQL
mysql -u root -p
mysql>SHOW DATABASES;
mysql>SHOW TABLES;
mysql>USE mysql;
mysql>CREATE DATABASE 数据库名字;
mysql>CREATE TABLE 表名 (字段定义)
mysql>DROP TABLE 数据库名.表名;
mysql>DROP DATABASE 数据库名
mysqldump -u root -p auth > mysql-auth.sql
mysqldump -u root -p mysql user > mysql.host-user.sql
mysqldump -u root -p -all-databases > mysql-all.sql
.
Ce qui précède est le contenu détaillé de. pour plus d'informations, suivez d'autres articles connexes sur le site Web de PHP en chinois!