麻豆小视频在线观看_中文黄色一级片_久久久成人精品_成片免费观看视频大全_午夜精品久久久久久久99热浪潮_成人一区二区三区四区

首頁 > 數據庫 > MySQL > 正文

mysql 5.7.19 二進制最新安裝

2024-07-24 13:14:36
字體:
來源:轉載
供稿:網友

首先從官網下載zip archive版本http://dev.mysql.com/downloads/mysql/

 

一、優化部分

1.操作系統參數調優

2.數據庫參數調優

3.防火墻設置等

#############################

二、安裝部分

1.創建用戶和組

# groupadd mysql# useradd -g mysql mysql

2.創建數據庫安裝目錄、授權

# mkdir /mysql /mysql/data /mysql/log # chown -R mysql:mysql /usr/local/mysql 

3.到安裝目錄,解壓安裝文件

#cd /usr/local# tar -zxvf mysql-5.7.19-linux-glibc2.12-x86_64.tar.gz# mv mysql-5.7.19-linux-glibc2.12-x86_64 mysql

4.授權

# chown -R mysql.mysql mysql

5.驗證權限

# ls -l mysqltotal 52drwxr-xr-x 2 mysql mysql 4096 Aug 8 04:06 bin-rw-r--r-- 1 mysql mysql 17987 Jun 22 22:13 COPYINGdrwxr-xr-x 2 mysql mysql 4096 Aug 8 04:06 docsdrwxr-xr-x 3 mysql mysql 4096 Aug 8 04:06 includedrwxr-xr-x 5 mysql mysql 4096 Aug 8 04:06 libdrwxr-xr-x 4 mysql mysql 4096 Aug 8 04:06 man-rw-r--r-- 1 mysql mysql 2478 Jun 22 22:13 READMEdrwxr-xr-x 28 mysql mysql 4096 Aug 8 04:06 sharedrwxr-xr-x 2 mysql mysql 4096 Aug 8 04:06 support-files

6.編輯參數文件

vim /etc/my.cnf[client]port = 3306socket = /tmp/mysql.sock[mysqld]server_id=10port = 3306user = mysqlcharacter-set-server = utf8mb4default_storage_engine = innodblog_timestamps = SYSTEMsocket = /tmp/mysql.sockbasedir = /usr/local/mysqldatadir = /mysql/datapid-file = /mysql/data/mysql.pidmax_connections = 1000max_connect_errors = 1000table_open_cache = 1024max_allowed_packet = 128Mopen_files_limit = 65535#####====================================[innodb]==============================innodb_buffer_pool_size = 1024Minnodb_file_per_table = 1innodb_write_io_threads = 4innodb_read_io_threads = 4innodb_purge_threads = 2innodb_flush_log_at_trx_commit = 1innodb_log_file_size = 512Minnodb_log_files_in_group = 2innodb_log_buffer_size = 16Minnodb_max_dirty_pages_pct = 80innodb_lock_wait_timeout = 30innodb_data_file_path=ibdata1:1024M:autoextendinnodb_undo_tablespaces=3#####====================================[log]==============================log_error = /mysql/log/mysql-error.log slow_query_log = 1long_query_time = 1 slow_query_log_file = /mysql/log/mysql-slow.logsql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

7.安裝數據庫

# ./bin/mysqld --initialize --user=mysql --basedir=/usr/local/mysql --datadir=/mysql/data --innodb_undo_tablespaces=3 --explicit_defaults_for_timestamp

8.配置啟動文件

cp support-files/mysql.server /etc/init.d/mysqlchkconfig --add mysqlchkconfig mysql onservice mysql start

9.配置環境變量

vi /etc/profile#for mysql mysql_home=/usr/local/mysqlPATH=$PATH:$mysql_home/binsource /etc/profile

10.查看默認密碼

grep -i password /mysql/log/mysql-error.log 

11.初始化密碼

mysql -uroot -p‘xxxxx‘SET PASSWORD=PASSWORD(‘root‘);flush privileges;

12.數據庫常規啟停

# mysqladmin -uroot -proot shutdown#mysqld_safe --defaults-file=/etc/my.cnf &#ps -ef|grep mysql

13.安全配置

# mysql_secure_installation Securing the MySQL server deployment.Enter password for user root: VALIDATE PASSWORD PLUGIN can be used to test passwordsand improve security. It checks the strength of passwordand allows the users to set only those passwords which aresecure enough. Would you like to setup VALIDATE PASSWORD plugin?Press y|Y for Yes, any other key for No: yThere are three levels of password validation policy:LOW  Length >= 8MEDIUM Length >= 8, numeric, mixed case, and special charactersSTRONG Length >= 8, numeric, mixed case, special characters and dictionary         filePlease enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 2Using existing password for root.Estimated strength of the password: 25 Change the password for root ? ((Press y|Y for Yes, any other key for No) : yNew password: Re-enter new password: Sorry, passwords do not match.New password: Re-enter new password: Sorry, passwords do not match.New password: Re-enter new password: Estimated strength of the password: 50 Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y ... Failed! Error: Your password does not satisfy the current policy requirementsNew 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) : yBy default, a MySQL installation has an anonymous user,allowing anyone to log into MySQL without having to havea user account created for them. This is intended only fortesting, and to make the installation go a bit smoother.You should remove them before moving into a productionenvironment.Remove anonymous users? (Press y|Y for Yes, any other key for No) : ySuccess.Normally, root should only be allowed to connect from‘localhost‘. This ensures that someone cannot guess atthe root password from the network.Disallow root login remotely? (Press y|Y for Yes, any other key for No) : ySuccess.By default, MySQL comes with a database named ‘test‘ thatanyone can access. This is also intended only for testing,and should be removed before moving into a productionenvironment.Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y - Dropping test database...Success. - Removing privileges on test database...Success.Reloading the privilege tables will ensure that all changesmade so far will take effect immediately.Reload privilege tables now? (Press y|Y for Yes, any other key for No) : ySuccess.All done! 

總結

以上所述是小編給大家介紹的mysql 5.7.19 二進制最新安裝,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復大家的。在此也非常感謝大家對VeVb武林網網站的支持!


注:相關教程知識閱讀請移步到MYSQL教程頻道。
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 日本成人在线免费 | 亚洲第一页中文字幕 | 69av导航 | 特一级毛片 | 久久免费观看一级毛片 | 看免费一级毛片 | 久久综合给合久久狠狠狠97色69 | 久久久国产精品成人免费 | 国产精品伦视频看免费三 | 中文字幕亚洲一区二区三区 | 在线免费av观看 | 视频一区二区三区免费观看 | 色淫影院 | 亚洲网站在线观看 | 看一级毛片 | 九九热精品在线 | 羞羞答答影院 | 香蕉久久久久久 | 国产毛片网站 | 亚洲欧美日韩中文在线 | 久久青草影院 | 在线观看免费毛片视频 | 国产免费一级淫片 | 国产成人av免费 | 亚洲成人国产 | 国产精品自拍av | 欧美一区二区三区免费观看 | 综合图区亚洲 | 久久av一区二区 | 精品国产一区二区三区四区阿崩 | va毛片| 国产一区二区三区网站 | 毛片视频免费观看 | 黄污免费网站 | 精国产品一区二区三区四季综 | 一级一级一级一级毛片 | 国产精品午夜一区 | 伊人999| 欧美重口另类videos人妖 | 欧美一级黄带 | 全黄毛片|