国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 數據庫 > MySQL > 正文

ubuntu kylin 14.10下多個mysql 5.7.14安裝教程

2024-07-24 12:53:50
字體:
來源:轉載
供稿:網友

前文已述,因為需要測試mysql的主從配置方案,所以要安裝多個mysql。這次是在ubuntu kylin 14.10上安裝多個mysql 5.7.14。

系統環境:ubuntu kylin 14.10,64位系統
mysql版本:5.7.14社區版
mysql下載地址:http://dev.mysql.com/downloads/mysql/,選擇 Linux - Generic,下載612.9M的mysql-5.7.14-linux-glibc2.5-x86_64.tar.gz
mysql官方安裝文檔:http://dev.mysql.com/doc/refman/5.7/en/binary-installation.html1.按照官方安裝文檔進行即可,只是一些shell命令做了修改,對ubuntu來說,大部分命令都需要在前面增加sudo

shell> sudo groupadd mysqlshell> sudo useradd -r -g mysql -s /bin/false mysqlshell> cd /usr/localshell> sudo tar -zxvf /path/to/mysql-VERSION-OS.tar.gzshell> sudo mv mysql-5.7.14-linux-glibc2.5-x86_64 mysql-5.7.14-linux-glibc2.5-x86_64-3306 #將mysql的目錄改了一下名shell> sudo ln -s mysql-5.7.14-linux-glibc2.5-x86_64-3306 mysql-3306shell> cd mysql-3306shell> sudo mkdir mysql-filesshell> sudo chmod 750 mysql-filesshell> sudo chown -R mysql:mysql .shell> sudo cp support-files/my-default.cnf ./my.cnf #copy一份my.cnf接著編輯my.cnf,打開basedir,datadir,port等項,按如下配置:basedir = /usr/local/mysql-3306datadir = /usr/local/mysql-3306/dataport = 3306server_id = 11然后開始初始化3306端口上的mysql:shell> sudo bin/mysqld --defaults-file=/usr/local/mysql-3306/my.cnf --initialize --user=mysql2016-07-29T15:38:48.896585Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).2016-07-29T15:38:48.896672Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.2016-07-29T15:38:48.896682Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.2016-07-29T15:38:50.498675Z 0 [Warning] InnoDB: New log files created, LSN=457902016-07-29T15:38:50.890849Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.2016-07-29T15:38:51.062752Z 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: 8c708a13-55a2-11e6-835e-a0481ced538c.2016-07-29T15:38:51.088854Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.2016-07-29T15:38:51.090179Z 1 [Note] A temporary password is generated for root@localhost: pJLwjf%q;1t)shell> sudo bin/mysql_ssl_rsa_setup --defaults-file=/usr/local/mysql-3306/my.cnfGenerating a 2048 bit RSA private key.........+++.......................+++writing new private key to 'ca-key.pem'-----Generating a 2048 bit RSA private key..........+++..............................................................+++writing new private key to 'server-key.pem'-----Generating a 2048 bit RSA private key................................................+++........................................+++writing new private key to 'client-key.pem'-----shell> sudo chown -R root .shell> sudo chown -R mysql data mysql-filesshell> sudo bin/mysqld_safe --user=mysql & #啟動mysql,在后臺運行# Next command is optionalshell> cp support-files/mysql.server /etc/init.d/mysql.server
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 莱西市| 简阳市| 兴安县| 丽江市| 三门峡市| 高清| 大新县| 晋宁县| 平谷区| 翁牛特旗| 于都县| 即墨市| 永和县| 安阳市| 罗甸县| 湘乡市| 宝丰县| 扎囊县| 安义县| 唐山市| 东莞市| 舒城县| 隆尧县| 温州市| 泽普县| 新源县| 南丰县| 南靖县| 临漳县| 太谷县| 南昌县| 资溪县| 大同县| 偏关县| 深泽县| 临武县| 奈曼旗| 浦县| 西和县| 东阳市| 萨嘎县|