MySQL是一種廣泛使用的開放源代碼關(guān)系數(shù)據(jù)庫管理系統(tǒng),它支持許多不同的操作系統(tǒng),在各種應(yīng)用程序中經(jīng)常用于同時處理大量數(shù)據(jù)。
在進行MySQL服務(wù)器的安裝配置之前,首先需要根據(jù)系統(tǒng)版本選擇相應(yīng)的MySQL安裝包進行下載,在本例中我們選擇了Ubuntu 18.04版本的MySQL安裝包。
$ sudo apt-get update $ sudo apt-get install mysql-server
安裝完成后,需要對MySQL進行一些基本配置,包括設(shè)置根用戶密碼、刪除匿名用戶、禁止遠程訪問等。
$ sudo mysql_secure_installation [sudo] password for user: Securing the MySQL server deployment. Enter password for user root: VALIDATE PASSWORD COMPONENT can be used to test passwords and improve security. It checks the strength of password and allows the users to set only those passwords which are secure enough. Would you like to setup VALIDATE PASSWORD component? Press y|Y for Yes, any other key for No: y There are three levels of password validation policy: LOW - Length >= 8 MEDIUM - Length >= 8, numeric, mixed case, and special characters STRONG - Length >= 8, numeric, mixed case, special characters and dictionary file Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 2 Please set the password for root here. New password: Re-enter new password: Estimated strength of the password: 100 Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y
安全設(shè)置完成后,可以登錄MySQL,創(chuàng)建用戶和數(shù)據(jù)庫,進行數(shù)據(jù)操作。
$ mysql -u root -p Enter password: mysql>CREATE DATABASE dbname; mysql>GRANT ALL PRIVILEGES ON dbname.* TO 'username'@'localhost' IDENTIFIED BY 'password'; mysql>FLUSH PRIVILEGES;
以上為MySQL服務(wù)器的安裝配置過程,可以根據(jù)實際需要進行修改和完善。
上一篇css中圖片x軸平鋪
下一篇css中圖片不變形