重新启动mysql
liu@liu-virtual-machine:~$ ps aux|grep mysqld mysql 5252 0.2 4.5 1496516 181200 ? Sl 11:01 0:01 /usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid liu 5366 0.0 0.0 16184 1076 pts/0 S+ 11:12 0:00 grep --color=auto mysqld liu@liu-virtual-machine:~$ sudo service mysql restart liu@liu-virtual-machine:~$
查看mysql是否运行以及重新启动mysql
进入mysql
liu@liu-virtual-machine:~$ mysql -uroot -p Enter password:
设置权限以及重新加载权限表; 更新权限;
ymysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql> flush privileges; Query OK, 0 rows affected (0.00 sec)