MySQL Server
From Oxxus Wiki
MySQL VPS Hosting should be the first place to start.
Contents |
Installing MySQL server
To install MySQL server, you would need to type one command
On CentOS/Fedora type: yum -y install mysql-server Debian/Ubuntu: apt-get install mysql-server
After that, type:
service mysqld start or /etc/init.d/mysqld start # (in case of ubuntu/debian OS)
And you are up and running !
Setting up MySQL root password
Default MySQL installation doesn't set MySQL password. To do this, you need to use mysqladmin command.
For example, if you want your mysql root password to be tx23p9gHj Type on the command line:
mysqladmin -u root password tx23p9gHj
Logging in phpMyAdmin
PhpMyAdmin is already pre-installed on your VPS. If you need to re-install it, just type on Fedora/CentOS:
yum -y install phpmyadmin
or on Debian/Ubuntu
apt-get install phpmyadmin
Before you can login, you need to edit blowfish secret in phpmyadmin's config file. That's a security measure to ensure your cookies are unique and thus prevent security breeches.
Edit the file located at /usr/share/phpmyadmin/config.inc.php or /usr/share/phpMyAdmin/config.inc.php depending on your installation. In a first few lines, you will see blowfish secret variable, and enter just any string there and save the file.
Now you can login to phpMyAdmin.
If you have any difficulties, please feel free to contact our support.
Changing MySQL root password
If you forgot your MySql password, you can change it, but it involves restarting of your MySql server.
Open /etc/my.cnf and add bellow [mysqld] line skip-grant-tables
It should like like this:
[mysqld] skip-grant-tables=1
After that restart your mysql server with:
service mysqld restart or /etc/init.d/mysqld restart
Open mysql command line with mysql -u root Now type following commands:
use mysql; update Users set Password=password('yourpassword') where User='root'; flush privileges; quit;
Replace yourpassword with the password you want set and that would be all. You need to edit /etc/my.cnf again and remove skip-grant-tables and restart mysql server.
Your new password should be in place.