How to repair MySQL database in DirectAdmin

When you cannot access your website and you are seeing this kind of message: SQL query: DELETE FROM sessions WHERE expiry <1349879630 MySQL said: #126 – Incorrect key file for table ‘./your_database/sessions.MYI’; try to repair it It is possible that the hosting server had crashed and rebooted. After the server has restarted, your database tables

How to Backup/Restore MySQL database with mysqldump command

Mysqldump is an effective tool to backup MySQL database. It creates an .sql file with DROP table, CREATE table and INSERT into sql-statements of the source database. 1. To back up a database, use the command as below: #mysqldump -u db_username -p [database_name] > dumpfilename.sql Key in the password when requested. 2. To restore a

MySQL remote connection for Windows Shared Hosting:

Remote access to MySQL database on Windows Shared Hosting is enabled by default, simply use SQLyog available at 1. Install and run SQLyog 2. Click on New… 3. Enter the following info: Host Address: Username: DatabaseUser Password: DatabaseUserPassword Port: 3306 Database: DatabaseName 4. Click on connect

How To Allow Access To Remote MySQL Database Using SSH

If your web server does not have phpMyAdmin installed, you may add remote host for your database by first accessing your web server via SSH. Step 1 – Login into MySQL server. Step 2 – If you wish to allow database user “ips1” to access database “myDatabase” at IP address ““, execute the following command.

How to change ‘da_admin’ User Password in MySQL

Login to mysql server using current da_admin include the following commands in the shell prompt: 1. Use mysql database(type command at mysql> prompt):          mysql> use mysql; 2.  Change password for user da_admin, enter:          mysql> update user set password=PASSWORD(“NEWPASSWD”) where User=’da_admin’; 3. Finally, reload the privileges with: mysql> flush privileges; mysql> quit; 4. DirectAdmin