1. <dd id="erndk"></dd>
                1. 普華linux——mysql環境配置

                  互聯網 2022/5/2 19:14:27

                  參考網址:https://www.cnblogs.com/louis-liu-oneself/p/13504270.htmlhttps://www.cnblogs.com/zero-gg/p/8875598.html1、下載安裝包https://downloads.mysql.com/archives/community/選擇linux-generic,64位tar -xzvf mysql-5.7.21-linux-glibc2.12-x86_64.tar.gz2、…

                  參考網址:
                  https://www.cnblogs.com/louis-liu-oneself/p/13504270.html
                  https://www.cnblogs.com/zero-gg/p/8875598.html
                  1、下載安裝包
                  https://downloads.mysql.com/archives/community/
                  選擇linux-generic,64位
                  tar -xzvf mysql-5.7.21-linux-glibc2.12-x86_64.tar.gz
                  2、卸載已安裝的mysql
                  查詢安裝
                  rpm -qa | grep mysql
                  卸載
                  rpm -e --nodeps mysql-5.1.73-3.el6.isoft.x86_64
                  rpm -e --nodeps mysql-connector-odbc-5.1.5r1144-7.el6.isoft.x86_64
                  rpm -e --nodeps mysql-server-5.1.73-3.el6.isoft.x86_64
                  rpm -e --nodeps mysql-libs-5.1.73-3.el6.isoft.x86_64
                  rpm -e --nodeps mysql-devel-5.1.73-3.el6.isoft.x86_64
                  3、/usr/local 目錄下創建文件夾存 mysql
                  mkdir /usr/local/mysql
                  cd
                  mv mysql-5.7.21-linux-glibc2.12-x86_64 /usr/local/mysql/

                  添加mysql組及用戶
                  groupadd mysql
                  useradd -r -g mysql mysql

                  cd /usr/local/mysql/
                  mkdir /usr/local/mysql/data
                  vim /etc/my.cnf

                  [mysql]
                  # 設置mysql客戶端默認字符集
                  default-character-set=utf8
                  socket=/var/lib/mysql/mysql.sock
                  [mysqld]
                  #skip-name-resolve
                  #設置3306端口
                  port = 3306
                  socket=/var/lib/mysql/mysql.sock
                  # 設置mysql的安裝目錄
                  basedir=/usr/local/mysql
                  # 設置mysql數據庫的數據的存放目錄
                  datadir=/usr/local/mysql/data
                  # 允許最大連接數
                  max_connections=200
                  # 服務端使用的字符集默認為8比特編碼的latin1字符集
                  character-set-server=utf8
                  # 創建新表時將使用的默認存儲引擎
                  default-storage-engine=INNODB
                  #lower_case_table_name=1
                  max_allowed_packet=16M

                  設置權限
                  chown -R root /usr/local/mysql
                  chown -R mysql:mysql /usr/local/mysql
                  chown -R mysql /usr/local/mysql/data

                  初始化MySQL
                  cd /usr/local/mysql/bin
                  ./mysqld --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data/ --initialize
                  2022-02-09T19:32:08.766360Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
                  2022-02-09T19:32:12.306161Z 0 [Warning] InnoDB: New log files created, LSN=45790
                  2022-02-09T19:32:12.778221Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
                  2022-02-09T19:32:12.870257Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: fb039020-89de-11ec-8d0f-0cda411dae1d.
                  2022-02-09T19:32:12.876549Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
                  2022-02-09T19:32:12.876984Z 1 [Note] A temporary password is generated for root@localhost: 5b8oNiAe+R4J

                  cp support-files/mysql.server /etc/rc.d/init.d/mysqld
                  chmod +x /etc/rc.d/init.d/mysqld
                  chkconfig --add mysqld
                  chkconfig --list mysqld

                  mkdir /var/lib/mysql
                  chown -R mysql:mysql /var/lib/mysql/


                  vim /etc/profile
                  export PATH=/usr/local/mysql/bin:$PATH

                  登錄
                  mysql -u root -p
                  set password for root@localhost = password('Sinosoft@2020');
                  UPDATE user SET authentication_string = PASSWORD("Sinosoft@2020") WHERE user='root' and host='%';
                  GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;
                  FLUSH PRIVILEGES;
                  select user,host from mysql.user;

                  啟動
                  service mysqld start
                  重啟
                  service mysqld restart
                  停止
                  service mysqld stop

                  隨時隨地學軟件編程-關注百度小程序和微信小程序
                  關于找一找教程網

                  本站文章僅代表作者觀點,不代表本站立場,所有文章非營利性免費分享。
                  本站提供了軟件編程、網站開發技術、服務器運維、人工智能等等IT技術文章,希望廣大程序員努力學習,讓我們用科技改變世界。
                  [普華linux——mysql環境配置]http://www.yachtsalesaustralia.com/tech/detail-318773.html

                  贊(0)
                  關注微信小程序
                  程序員編程王-隨時隨地學編程

                  掃描二維碼或查找【程序員編程王】

                  可以隨時隨地學編程啦!

                  技術文章導航 更多>
                  国产在线拍揄自揄视频菠萝

                        1. <dd id="erndk"></dd>