MySQL搭建_Ubuntu

Ubuntu上的MySQL搭建

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
28
29
30
31
32
33
34
35
root@iZwz969jm0y04abuhgx4byZ:~# apt-get update
root@iZwz969jm0y04abuhgx4byZ:~# apt-get upgrade
root@iZwz969jm0y04abuhgx4byZ:~# apt-get install mysql-server
root@iZwz969jm0y04abuhgx4byZ:~# apt-get install mysql-client
root@iZwz969jm0y04abuhgx4byZ:~# apt-get install libmysqlclient-dev
root@iZwz969jm0y04abuhgx4byZ:~# netstat -tap | grep mysql
tcp 0 0 localhost:mysql *:* LISTEN 2109/mysqld
root@iZwz969jm0y04abuhgx4byZ:~# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.7.24-0ubuntu0.16.04.1 (Ubuntu)

Copyright (c) 2000, 2018, 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.
exit' at line 1
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
4 rows in set (0.00 sec)

mysql> exit
Bye
root@iZwz969jm0y04abuhgx4byZ:~#
给咱来个🍰,啾咪