日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

linux 安装mysql两种方式

發布時間:2025/3/20 数据库 37 豆豆
生活随笔 收集整理的這篇文章主要介紹了 linux 安装mysql两种方式 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

yum -y install gcc gcc-c++ ncurses-devel cmake ?bison ? zlib ? ?zlib-devel libxml ?openssl ? dtrace?

解壓并安裝MySQL

# tar zxvf mysql-5.6.12.tar.gz?

# cd mysql-5.6.12?

# cmake ./

# -DCMAKE_INSTALL_PREFIX=/usr/local/mysql??????????\????#安裝路徑

# -DMYSQL_DATADIR=/usr/local/mysql/data????????????\????#數據文件存放位置

# -DSYSCONFDIR=/etc????????????????????????????????\????#my.cnf路徑

# -DWITH_MYISAM_STORAGE_ENGINE=1???????????????????\????#支持MyIASM引擎

# -DWITH_INNOBASE_STORAGE_ENGINE=1?????????????????\????#支持InnoDB引擎

# -DWITH_MEMORY_STORAGE_ENGINE=1???????????????????\????#支持Memory引擎

# -DWITH_READLINE=1????????????????????????????????\????#快捷鍵功能(我沒用過)

# -DMYSQL_UNIX_ADDR=/tmp/mysqld.sock???????????????\????#連接數據庫socket路徑

# -DMYSQL_TCP_PORT=3306????????????????????????????\????#端口

# -DENABLED_LOCAL_INFILE=1?????????????????????????\????#允許從本地導入數據

# -DWITH_PARTITION_STORAGE_ENGINE=1????????????????\????#安裝支持數據庫分區

# -DEXTRA_CHARSETS=all?????????????????????????????\????#安裝所有的字符集

# -DDEFAULT_CHARSET=utf8???????????????????????????\????#默認字符

# -DDEFAULT_COLLATION=utf8_general_ci

更多詳細參數可參考?http://dev.mysql.com/doc/refman/5.5/en/source-configuration-options.html

?

glibc安裝成功后 ?

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

./bin/mysqladmin -u root password 'new-password'
./bin/mysqladmin -u root -h localhost.localdomain password 'new-password'

Alternatively you can run:

./bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:

cd . ; ./bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl

cd mysql-test ; perl mysql-test-run.pl

Please report any problems at http://bugs.mysql.com/

The latest information about MySQL is available on the web at

http://www.mysql.com

Support MySQL by buying support/licenses at http://shop.mysql.com

New default config file was created as ./my.cnf and
will be used by default by the server when you start it.
You may edit this file to change server settings

轉載于:https://www.cnblogs.com/wuzs/p/5977121.html

總結

以上是生活随笔為你收集整理的linux 安装mysql两种方式的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。