centos 6.5 安裝mysql5.5.28

來源:互聯網
上載者:User

標籤:

1,useradd -s /sbin/nologin mysql
2,mkdir -p /data/mysql/data
3,chown -R mysql:mysql /data/mysql
4,yum install gcc gcc-c++ cmake ncurses-devel bison
5,wget http://ncu.dl.sourceforge.net/project/mysql.mirror/MySQL%205.5.28/mysql-5.5.28.tar.gz
6,tar xzvf mysql-5.5.28.tar.gz
7,cd mysql-5.5.28
//相當於以前的./configure
8,cmake -DMYSQL_USER=mysql -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DINSTALL_DATADIR=/data/mysql/data -DMYSQL_UNIX_ADDR=/tmp/mysqld.sock -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DEXTRA_CHARSETS=all -DWITH_EMBEDDED_SERVER=1 -DENABLED_LOCAL_INFILE=1 -DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1
9,make && make install
10,chown -R mysql:mysql /usr/local/mysql/
11,mv /root/mysql-5.5.28/support-files/my-large.cnf /etc/my.cnf
12,mv /root/mysql-5.5.28/support-files/mysql.server /etc/init.d/mysqld
13,chmod a+x /etc/init.d/mysqld
14,chkconfig --level 345 mysqld on
15,echo "export PATH=/usr/local/mysql/bin/:$PATH" >> /etc/profile
16,source /etc/profile
17,/usr/local/mysql/scripts/mysql_install_db --user=mysql --defaults-file=/etc/my.cnf --basedir=/usr/local/mysql5.5 --datadir=/data/mysql/data
18,vim /etc/my.cnf
19,在[mysqld]處添加
basedir=/usr/local/mysql
datadir=/data/mysql/data
20,service mysqld start
21,/usr/local/mysql/bin/mysqladmin -u root password ‘123‘
22,mysql -u root -p123

====分割線====

//mysql實現遠程連結 your paaaword 為你的密碼 root為你的帳號 %不限定串連的ip

mysql>GRANT ALL PRIVILEGES ON *.* TO [email protected]‘%‘ IDENTIFIED BY ‘your paaaword‘; 

mysql>GRANT ALL on *.* to [email protected]% IDENTIFIED BY ‘your paaaword‘;

mysql安裝相關連結
http://blog.chinaunix.net/uid-26931379-id-3193926.html

centos 6.5 安裝mysql5.5.28

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.