【MySQL】Linux 5.1作業系統安裝成功之後配置MySQL資料庫過程
博文目的:安裝完Linux作業系統後,明明在安裝過程中選擇了MySQL元件,但是怎麼就是進入不到MySQL資料庫中呢?OK,普及工作開始。
這裡我最新安裝的作業系統版本為:
[root@testdb ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.1 (Tikanga)
1.複製 my.cnf
[root@testdb ~]# cp /usr/share/doc/mysql-server-5.0.22/my-medium.cnf /etc/my.cnf
2.初始化資料庫
/usr/bin/mysql_install_db --user=mysql
3.啟動 MySQL 服務
/usr/bin/mysqld_safe --user=mysql &
4.停止 MySQL 服務
/usr/bin/mysqladmin shutdown
5.設定 MySQL 服務開機自啟動
# cp mysql.server /etc/rc.d/init.d/mysqld
設定使mysql每次啟動都能自動執行
# chkconfig --add mysqld
# chkconfig --level 345 mysqld on
透過 service mysql start | stop | restart 管理 mysql 服務
# service mysqld start //啟動mysqld服務
# service mysqld stop //停止mysqld服務
# service mysqld restart //重啟mysqld服務
6.能夠進入到MySQL資料庫啦!
[root@testdb ~]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4 to server version: 5.0.22-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
-- The End --
這裡我最新安裝的作業系統版本為:
[root@testdb ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.1 (Tikanga)
1.複製 my.cnf
[root@testdb ~]# cp /usr/share/doc/mysql-server-5.0.22/my-medium.cnf /etc/my.cnf
2.初始化資料庫
/usr/bin/mysql_install_db --user=mysql
3.啟動 MySQL 服務
/usr/bin/mysqld_safe --user=mysql &
4.停止 MySQL 服務
/usr/bin/mysqladmin shutdown
5.設定 MySQL 服務開機自啟動
# cp mysql.server /etc/rc.d/init.d/mysqld
設定使mysql每次啟動都能自動執行
# chkconfig --add mysqld
# chkconfig --level 345 mysqld on
透過 service mysql start | stop | restart 管理 mysql 服務
# service mysqld start //啟動mysqld服務
# service mysqld stop //停止mysqld服務
# service mysqld restart //重啟mysqld服務
6.能夠進入到MySQL資料庫啦!
[root@testdb ~]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4 to server version: 5.0.22-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
-- The End --
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/519536/viewspace-607470/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Linux系統徹底解除安裝MySQL資料庫LinuxMySql資料庫
- Linux下安裝Mysql資料庫LinuxMySql資料庫
- 關於安裝VMware以及Linux作業系統過程Linux作業系統
- Linux系統下自行編譯安裝MySQL及基礎配置全過程解析Linux編譯MySql
- 9、Linux下mysql資料庫安裝與配置實操LinuxMySql資料庫
- linux mysql5.6版本的安裝配置過程LinuxMySql
- linux系統資料恢復成功的過程Linux資料恢復
- Arm架構下麒麟作業系統安裝配置Mariadb資料庫架構作業系統資料庫
- Windows作業系統安裝MySQL解壓版Windows作業系統MySql
- MySql資料庫——儲存過程MySql資料庫儲存過程
- 【MySQL資料庫】MySQL5.7安裝與配置、視覺化工具安裝和破解MySql資料庫視覺化
- Ubuntu安裝MySQL資料庫UbuntuMySql資料庫
- Centos7系統如何安裝MySQL5.7資料庫?CentOSMySql資料庫
- Python基礎之資料庫:2、MySQL的下載與安裝、基本使用、系統服務製作Python資料庫MySql
- LINUX 環境 mysql to mysql OGG安裝配置(二)LinuxMySql
- Linux系統下載mysql與安裝LinuxMySql
- Linux系統安裝MySQL詳細教程LinuxMySql
- 安裝MySQL8資料庫MySql資料庫
- Mysql for Linux安裝配置之—— rpm(bundle)安裝MySqlLinux
- Mysql for Linux安裝配置之—— 原始碼安裝MySqlLinux原始碼
- 網站搭建資料庫篇-Linux系統MySQL配置主從分離網站資料庫LinuxMySql
- # 2020-09-26 #「Linux」- 在作業系統安裝後……Linux作業系統
- MySQL下載安裝配置及JDBC連線資料庫MySqlJDBC資料庫
- Hive -------- 使用mysql儲存hive後設資料,Mysql的安裝以及配置步驟HiveMySql
- MySQL - 下載與安裝配置(Linux)MySqlLinux
- MySQL資料庫安裝步驟-WindowsMySql資料庫Windows
- docker 安裝執行mysql資料庫DockerMySql資料庫
- 在FreeBSD中安裝MySQL資料庫MySql資料庫
- 下載和安裝MySQL資料庫MySql資料庫
- 使用PowerShell/CMD自動化安裝並配置MySQL資料庫MySql資料庫
- 【配置上線】Oracle資料庫Linux系統下安裝(圖形介面)Oracle資料庫Linux
- MySQL預設資料庫之mysql庫MySql資料庫
- mysql5.7.23安裝詳細過程MySql
- Ubuntu 16.04 安裝 MySQL 8.0 全過程UbuntuMySql
- redhat 5.4下安裝MYSQL全過程RedhatMySql
- window系統安裝mysqlMySql
- 使用AnalyticDB MySQL建立資料庫及表過程MySql資料庫
- MySQL安裝配置MySql
- 【資料庫資料恢復】linux系統下MYSQL資料庫資料恢復案例資料庫資料恢復LinuxMySql