-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmysql commands
28 lines (27 loc) · 1.08 KB
/
mysql commands
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Remote Database Access
http://www.cyberciti.biz/tips/how-do-i-enable-remote-access-to-mysql-database-server.html
----------------------------------------------------------------------------
mysql -u username -p
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
php -r 'mysql_connect();'
-------------------------------------------------------------------
mysql -p -e"SHOW DATABASES;"
-========================================================
mysql running or not
ps -ef | grep mysqld
************************************************************8
check mysqld is running
mysqladmin -u root -p status
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
resetting root password mysql
/etc/init.d/mysqld stop
mysqld_safe --skip-grant-tables &
mysql -u root
mysql> use mysql;
mysql> update user set password=PASSWORD("newrootpassword") where User='root';
mysql> flush privileges;
mysql> quit
/etc/init.d/mysqld stop
/etc/init.d/mysqld start
----------------------------------------------------------------------
http://www.yolinux.com/TUTORIALS/LinuxTutorialMySQL.html