melina@melina-laptop:~$ 11032021:13:14 mysqld_safe Logging to syslog. 11032021:13:14 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
看到上面的结果后,输入mysql -u melina 出现下面结果:
1 2 3 4 5
Welcome to the MySQL monitor. Commands endwith ; or \\g. Your MySQL connection id is1 Serverversion: 5.1.37-1ubuntu5.5 (Ubuntu) Type "help;" or "\\h" for help. Type "\\c" to clear the currentinputstatement. mysql>
输入use mysql
1 2 3 4
mysql> use mysql Reading table information for completion oftableandcolumn names You can turn off this feature toget a quicker startup with -A Database changed
mysql> commit; Query OK, 0rows affected (0.00 sec) mysql> exit; Bye melina@melina-laptop:~$ mysql -u root Welcome to the MySQL monitor. Commands endwith ; or \\g. Your MySQL connection id is3 Serverversion: 5.1.37-1ubuntu5.5 (Ubuntu)
Type "help;" or "\\h" for help. Type "\\c" to clear the currentinputstatement.