您好,登錄后才能下訂單哦!
這篇文章給大家分享的是有關mysql如何查看用戶名的內容。小編覺得挺實用的,因此分享給大家做個參考。一起跟隨小編過來看看吧。
啟動數據庫:
[root@server ~]# mysqld_safe &[1] 3289 [root@server ~]# 130913 08:19:58 mysqld_safe Logging to '/usr/local/mysql/data/server.gao.err'. 130913 08:19:58 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
連接到數據庫:
[root@server ~]# mysql -uroot -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.6.13 MySQL Community Server (GPL) Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql>
查看數據庫列表:
mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | test | +--------------------+ rows in set (0.00 sec) mysql>
查看用戶狀態:
mysql> use mysql; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> select host,user from mysql.user; +------------+------+ | host | user | +------------+------+ | 127.0.0.1 | root | | ::1 | root | | localhost | | | localhost | root | | server.gao | | | server.gao | root | +------------+------+ rows in set (0.00 sec) mysql>
感謝各位的閱讀!關于mysql如何查看用戶名就分享到這里了,希望以上內容可以對大家有一定的幫助,讓大家可以學到更多知識。如果覺得文章不錯,可以把它分享出去讓更多的人看到吧!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。