To remotely connect to your MySQL databases, you must have an I.P.-based account. Login to your control panel and click on the side menu "ValueApps" then the "Database" tab. If you have not installed MySQL, click on "MySQL Database" under Available ValueApps. If you have already installed MySQL, click on "MySQLs" under Installed ValueApps. Check the box "TCP/IP Connection". Now login to your account via SSH.
STEPS:
You have to login to MySQL first.
mysql -u root -p
(will prompt for password)
GRANT ALL PRIVILEGES ON *.* TO USERNAME@IP IDENTIFIED BY "PASSWORD";
*.* -- All Database or DatabaseName.*
USERNAME - Username
IP -- IP that needs to be allowed to connect to this server remotely.
ABHIONLINUX
Site useful for linux administration and web hosting
2009/08/15
How to reset the mySQL admin password
In a Unix environment, the procedure for resetting the root password is as follows:
1. Log on to your system as either the Unix root user or as the same user that the mysqld server runs as.
2. Locate the .pid file that contains the server's process ID. The exact location and name of this file depend on your distribution, hostname, and configuration. Common locations are /var/lib/mysql/, /var/run/mysqld/, and /usr/local/mysql/data/. Generally, the filename has the extension of .pid and begins with either mysqld or your system's hostname.
You can stop the MySQL server by sending a normal kill (not kill -9) to the mysqld process, using the pathname of the .pid file in the following command:
shell> kill `cat /mysql-data-directory/host_name.pid`
Note the use of backticks rather than forward quotes with the cat command; these cause the output of cat to be substituted into the kill command.
3. Restart the MySQL server with the special --skip-grant-tables option:
shell> mysqld_safe --skip-grant-tables &
4. Set a new password for the root@localhost MySQL account:
shell> mysqladmin -u root flush-privileges password "newpwd"
Replace "newpwd'' with the actual root password that you want to use.
5. You should be able to connect using the new password.
1. Log on to your system as either the Unix root user or as the same user that the mysqld server runs as.
2. Locate the .pid file that contains the server's process ID. The exact location and name of this file depend on your distribution, hostname, and configuration. Common locations are /var/lib/mysql/, /var/run/mysqld/, and /usr/local/mysql/data/. Generally, the filename has the extension of .pid and begins with either mysqld or your system's hostname.
You can stop the MySQL server by sending a normal kill (not kill -9) to the mysqld process, using the pathname of the .pid file in the following command:
shell> kill `cat /mysql-data-directory/host_name.pid`
Note the use of backticks rather than forward quotes with the cat command; these cause the output of cat to be substituted into the kill command.
3. Restart the MySQL server with the special --skip-grant-tables option:
shell> mysqld_safe --skip-grant-tables &
4. Set a new password for the root@localhost MySQL account:
shell> mysqladmin -u root flush-privileges password "newpwd"
Replace "newpwd'' with the actual root password that you want to use.
5. You should be able to connect using the new password.
Subscribe to:
Comments (Atom)