Mysql資料庫簡單安裝(二進位)

來源:互聯網
上載者:User

標籤:資料庫   mysql   二進位   

二進位安裝:[[email protected] ~]# mkdir /home/lufeng/tools -p[[email protected] ~]# cd /home/lufeng/tools   [[email protected] tools]# rz[[email protected] tools]# tar xf mysql-5.5.49-linux2.6-x86_64.tar.gz[[email protected] tools]# mkdir -p /application/mysql-5.5.49[[email protected] tools]# mv mysql-5.5.49-linux2.6-x86_64 /application/mysql-5.5.49建立mysql使用者|組[[email protected] tools]# groupadd mysql[[email protected] tools]# useradd mysql -g mysql -s /sbin/nologin -M初始化設定檔[[email protected] tools]# ln -s /application/mysql-5.5.49/ /application/mysql[[email protected] tools]# cd /application/mysql[[email protected] mysql]# cp support-files/my-small.cnf /etc/my.cnf初始化資料庫檔案[[email protected] mysql]# mkdir -p /application/mysql/data[[email protected] mysql]# chown -R mysql.mysql /application/mysql/[[email protected] mysql]# /application/mysql/scripts/mysql_install_db --basedir=/application//mysql --datadir=/application/mysql/data --user=mysql配置並啟動mysql[[email protected] mysql]# cp support-files/mysql.server /etc/init.d/mysqld[[email protected] mysql]# chmod +x /etc/init.d/mysqld[email protected] mysql]# sed -i ‘s#/usr/local/mysql#/application/mysql#g‘ /application/mysql/bin/mysqld_safe /etc/init.d/mysqld[[email protected] mysql]# /etc/init.d/mysqld startStarting MySQL... SUCCESS! [[email protected] mysql]# netstat -lntup|grep mysqltcp        0      0 0.0.0.0:3306                0.0.0.0:*                   LISTEN      2951/mysqld         配置全域使用路徑[[email protected] ~]# echo ‘export PATH=/application/mysql/bin:$PATH‘ >>/etc/profile[[email protected] ~]# tail -1 /etc/profileexport PATH=/application/mysql/bin:$PATH[[email protected] ~]# echo $PATH/application/mysql/bin:/applicaion/mysql/bin:/applicaion/mysql/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin安全配置:[[email protected] ~]# mysqladmin -u root password ‘199429‘[[email protected] ~]# mysqlERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: NO)[[email protected] ~]# mysql -uroot -p刪除多餘使用者:+------+-----------+| user | host      |+------+-----------+| root | 127.0.0.1 || root | localhost |+------+-----------+

本文出自 “大夢初醒” 部落格,請務必保留此出處http://bestlufeng.blog.51cto.com/11790256/1912674

Mysql資料庫簡單安裝(二進位)

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.