Joomla and Mysql

Had an interesting problem.

One of my hosted sites lost the mysql database for Joomla, not sure, but it would appear that a sysadmin some how deleted the mysql database, but we did not know this until the user went to their website and found it gone.

Database Error: Unable to connect to the database:Could not connect to MySQL

I take two backups from my cPanel, one via cPanel, and one via my owb backup system.

Therefore I had a copy of the database sitting on my remote backup server.

  1. Copied back the remote backup.
  2. Put the Joomla, mysql database back in to /var/lib/mysql
  3. Set all chmod and chown to correct settings
  4. Website still gone
  5. In mysql there is no user or db records for this site/database
  6. Used this script to create the needed users for this database.
  7. Replace the'something' with what it should be, every site will be different.
USE mysql;
REPLACE INTO user (host, user, password)
VALUES (
'localhost',
'something_jo151',
-- IMPORTANT: Change this password.
PASSWORD('somethingelse')
);

REPLACE INTO db (host, db, user, select_priv, insert_priv, update_priv, delete_priv,
create_priv, drop_priv, references_priv, index_priv, alter_priv, create_tmp_table_priv,
lock_tables_priv, create_view_priv, show_view_priv, create_routine_priv, alter_routine_priv, execute_priv)
VALUES (
'localhost',
'something\_jo151',
'something_jo151',
'Y', 'Y', 'Y', 'Y',
'Y', 'Y', 'Y', 'Y',
'Y', 'Y', 'Y', 'Y',
'Y', 'Y', 'Y', 'Y'
);

FLUSH PRIVILEGES

My customers site was back.

select_priv, insert_priv, update_priv, delete_priv, create_priv, drop_priv, references_priv, index_priv, alter_priv, create_tmp_table_priv, lock_tables_priv, create_view_priv, show_view_priv, create_routine_priv, alter_routine_priv, execute_priv

ai Domain Check

Domain Name :
Check All Domain Types
.co.nz .net.nz
.org.nz .gen.nz
.school.nz .ac.nz
.maori.nz .geek.nz