mysql开机启动
将 /mydata/lamp/mysql/bin/mysqld_safe --user=shujuku &,写入rc.local:
vi /etc/rc.d/rc.local
root账户密码设置
/mydata/lamp/mysql/bin/mysqld_safe --user=shujuku &
mysql -u root
将 /mydata/lamp/mysql/bin/mysqld_safe --user=shujuku &,写入rc.local:
vi /etc/rc.d/rc.local
root账户密码设置
/mydata/lamp/mysql/bin/mysqld_safe --user=shujuku &
mysql -u root
mysql>use mysql;
mysql>desc user;
mysql> GRANT ALL PRIVILEGES ON *.* TO root@"%" IDENTIFIED BY "root"; //为root添加远程连接的能力。
mysql>update user set Password = password('xxxxxx') where User='root';
mysql>select Host,User,Password from user where User='root';
mysql>flush privileges;
mysql>exit