Liunx-redhat系統安裝mysql

來源:互聯網
上載者:User
下載安裝檔案
將下載檔案複製到/usr/local下
# cd /usr/local
解壓mysql
# tar -zvxf  mysql-5.0.41-linux-i686-glibc23.tar.gz
重新命名
# mv  mysql-5.0.41-linux-i686-glibc23 mysql
# cp /usr/local/mysql/support-files/my-medium.cnf /etc/my.cnf
添加mysql使用者及使用者組
# groupadd mysql
# useradd -g mysql mysql
修改mysql目錄許可權
# chown -R root /usr/local/mysql
# chgrp -R mysql /usr/local/mysql
# chown -R mysql /usr/local/mysql/data
產生mysql系統資料庫
# /usr/local/mysql/scripts/mysql_install_db --user=mysql&
啟動mysql服務
# /usr/local/mysql/bin/mysqld_safe --user=mysql&
如出現 Starting mysqld daemon with databases from /usr/local/mysql/data
代表正常啟動mysql服務了, 按Ctrl + C 跳出
建立mysql資料庫
[root@olivenan home]# mysql
Welcome to the MySQL monitor.  Commands end with ; or /g.
Your MySQL connection id is 79
Server version: 5.0.41-log MySQL Community Server (GPL)
Type 'help;' or '/h' for help. Type '/c' to clear the buffer.
mysql> create database freequery;
建立使用者
mysql> grant all on *.* to freequery@"%" identified by "freequery";
           

聯繫我們

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