Installing MySQL server in linux command
2011-10-24 19:39
253 查看
(1) Config the old mysql
Inorder to check if mysql is already installed or not run this command
which mysql
If found it will show some directory name otherwise not found
In order to remove old mysql
yum remove mysql-server
yum remove mysql
(2) Now to install mysql run this command from the shell or a command line access point
yum install mysql-server
yum install mysql
yum install mysql-devel
Inorder to use with php
yum install php-mysql
(3) Sart mysql server
service mysqld start
If you didn't start the mysql server, you'll get the following error:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'
(4) By default mysql has the no passward. To change the password in command shell write the following commands
mysql
mysql> USE mysql;
mysql> UPDATE user SET Password=PASSWORD('new-password') WHERE user='root';
mysql> FLUSH PRIVILEGES;
That's all, if anything is missing let me know
Inorder to check if mysql is already installed or not run this command
which mysql
If found it will show some directory name otherwise not found
In order to remove old mysql
yum remove mysql-server
yum remove mysql
(2) Now to install mysql run this command from the shell or a command line access point
yum install mysql-server
yum install mysql
yum install mysql-devel
Inorder to use with php
yum install php-mysql
(3) Sart mysql server
service mysqld start
If you didn't start the mysql server, you'll get the following error:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'
(4) By default mysql has the no passward. To change the password in command shell write the following commands
mysql
mysql> USE mysql;
mysql> UPDATE user SET Password=PASSWORD('new-password') WHERE user='root';
mysql> FLUSH PRIVILEGES;
That's all, if anything is missing let me know
相关文章推荐
- Installing VMware Server & Windows in Linux
- How to install Mysql in linux server
- MYSQL 5.7 Linux脚本出现[Warning] Using a password on the command line interface can be insecure.
- Use expect command to interact with mysql in linux system
- UNDERSTANDING FREE COMMAND IN LINUX/UNIX
- connect to mysql by odbc in linux
- 新部署的linux web服务器error Host ‘*.*.*.*’ is not allowed to connect to this MySQL server
- 在Linux上安装MySQL Server 5.0
- SuSE Linux Enterprise Server 11 SP2 安装mysql
- rlwrap for Command Line History and Editing in SQL*Plus and RMAN on Linux
- MySQL 5.6 Warning: Using a password on the command line interface can be insecure
- Installing Oracle 9i on Red Hat Enterprise Linux Advanced Server 4, 3, 2.1, and on Red Hat 9, 8.0, 7.3, 7.2, 7.1 (x86)
- mysql/sqlserver where in 传参数的问题
- 15 Basic ‘ls’ Command Examples in Linux
- Linux mysql cant connect to mysql server through socket '/tmp/mysql.sock'(2)错误
- You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near
- Mysql Linux Command line Import .sql File
- Configuring the VNC server/viewer in Linux.
- error: command 'x86_64-linux-gnu-gcc' failed with exit status 1” in virtualenv
- ubuntu server 安装mysql-5.5.22-linux2.6-i686.tar.gz