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

首頁 > 系統 > Linux > 正文

linux mysql-5.6.26 安裝

2024-06-28 13:19:21
字體:
來源:轉載
供稿:網友
linux MySQL-5.6.26 安裝下載地址

ftp://mirror.switch.ch/mirror/mysql/Downloads/MySQL-5.6/mysql-5.6.26-linux-glibc2.5-x86_64.tar.gz

解壓
tar -xzf mysql-5.6.26-linux-glibc2.5-x86_64.tar.gz

注:安裝目錄需要設置到解壓目錄,否則報以下錯誤

FATAL ERROR: Could not find ./bin/my_PRint_defaultsIf you compiled from source, you need to run 'make install' tocopy the software into the correct location ready for Operation.If you are using a binary release, you must either be at the toplevel of the extracted archive, or pass the --basedir optionpointing to that location.

or

FATAL ERROR: Could not find my-default.cnfIf you compiled from source, you need to run 'make install' tocopy the software into the correct location ready for operation.If you are using a binary release, you must either be at the toplevel of the extracted archive, or pass the --basedir optionpointing to that location.

將解壓的目錄放到/usr/local下改為mysql或添加軟連接

mv mysql-5.6.26-linux-glibc2.5-x86_64 mysql

or

ln -s  /www/mysql-5.6.26-linux-glibc2.5-x86_64 /usr/local/mysql
增加mysql用戶和組
groupadd mysqluseradd -r -g mysql mysql

修改mysql目錄及子文件屬主和屬組

chown -R mysql:mysql mysql
進入mysql目錄并安裝
cd mysqlscripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/var/lib/mysql

安裝過程可能缺少某些文件,一般用yum install -y xxx按需安裝即可.

實現使用service mysqll (start|status|stop)命令操作mysql.

cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql

錯誤:

[root@localhost mysql]# mysql-bash: mysql: command not found

解決:配置環境變量,把export PATH=$PATH:/usr/local/mysql/bin添加到/etc/profile中,source /etc/profile重新加載環境變量,service mysql start啟動mysql服務。

錯誤:

[root@localhost mysql]# mysqlERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

解決:

mysql --socket=/var/lib/mysql/mysql.sockln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
啟動成功
mysql> select version();+-----------+| version() |+-----------+| 5.6.26 |+-----------+1 row in set (0.00 sec)
成功后可能需要往mysql的user表增加新賬號

錯誤:指定了嚴格模式,為了安全,嚴格模式禁止通過insert 這種形式直接修改mysql庫中的user表進行添加新用戶

1364 - Field 'ssl_cipher' doesn't have a default value

解決:

vim /usr/local/mysql/my.cnf
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES改為sql_mode=NO_ENGINE_SUBSTITUTION


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 石门县| 景德镇市| 遂川县| 专栏| 镇雄县| 上杭县| 宁蒗| 咸阳市| 白城市| 毕节市| 大港区| 江陵县| 鄱阳县| 汤阴县| 阳东县| 永福县| 五莲县| 诸城市| 汪清县| 时尚| 沙洋县| 洮南市| 惠东县| 屏东市| 九龙县| 得荣县| 大同县| 五华县| 达孜县| 陇西县| 荥阳市| 青川县| 淮南市| 田林县| 阳江市| 龙南县| 丹东市| 巴青县| 北安市| 裕民县| 汾阳市|