1.1 Install MySQL (in the middle you need to set the database password)
sudo apt-get install Mysql-server
sudo apt-get install php5-mysql #安装php5-mysql is to connect PHP with MySQL, install PHP before installation.
1.2 Confirm the MySQL installation information according to the installation directory, this command is different from the teaching video
Cat/etc/php5/mods-available/mysql.ini //php5.0
1.3 appears cat:/etc/php5/conf.d/mysql.ini:no such file or directory description is not loaded properly, you need to execute the following command.
[Email protected]:~$ sudo apt-get install Php-mysql
2.1 MySQL Related commands
sudo service MySQL restart #重启mysqlsudo start mysql #手动的话这样启动sudo stop MySQL #手动停止
Pgrep mysqld #如果mysql已经开启, the MySQL run ID will be returned
Mysql-u root-p #登陆mysql, you need to enter a password
Linux Getting Started (quad) Linux run environment MySQL detailed operation