1. 程式人生 > >騰訊雲ubuntu安裝使用MySQL

騰訊雲ubuntu安裝使用MySQL

 

安裝步驟

[email protected]0-2-ubuntu:~$ sudo apt-get install mysql-server

(密碼: root/root)

[email protected]-0-2-ubuntu:~$ sudo apt-get install mysql-client

[email protected]-0-2-ubuntu:~$ sudo apt-get install libmysqlclient-dev

 

檢測是否安裝成功

1 [email protected]0-2-ubuntu:~$ sudo
netstat -nap | grep mysql 2 tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 4545/mysqld 3 unix 2 [ ACC ] STREAM LISTENING 7256481 4545/mysqld /var/run/mysqld/mysqld.sock 4 unix 3 [ ] STREAM CONNECTED 7271318 4545/mysqld /var/run/mysqld/mysqld.sock
5 unix 3 [ ] STREAM CONNECTED 7271317 6995/mysql

 

操作資料庫

[email protected]0-2-ubuntu:~$ mysql -u root -p

mysql> show databases;

mysql> show tables;