Forum Moderators: coopster & phranque

Message Too Old, No Replies

loading sql into databse via phpmyadmin

loading sql into database

         

stevenjm

4:33 am on Apr 1, 2005 (gmt 0)

10+ Year Member



hi, have developed a site using exponent(opensource cms) and am having trouble loading sql commands to remote server database via phpmyadmin (clean empty new database)and am hoping somebody can help(am not fully literate with mysql) using sql dumped from my local machine(mysql)
its creating the table ok but then stopping on an error .

on entering query:
more sql here
--
-- Dumping data for table `exponent_addressbook_contact`
--

/*!40000 ALTER TABLE `exponent_addressbook_contact` DISABLE KEYS */;
LOCK TABLES `exponent_addressbook_contact` WRITE;
UNLOCK TABLES;
/*!40000 ALTER TABLE `exponent_addressbook_contact` ENABLE KEYS */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

I am getting an error stating:
Error

SQL-query:

LOCK TABLES `exponent_addressbook_contact` WRITE

MySQL said: Documentation
#1044 - Access denied for user: 'meal@localhost' to database 'mealy'

I really need some help with this and am wondering why the database will not let me "lock" "unlock" and if there is a workaround or if this lock unlock is even necesary. its creating the first table and then going no further(theres a heap of tables to go)
thanks heaps to anybody that can help

gliff

5:15 pm on Apr 1, 2005 (gmt 0)

10+ Year Member



Your mysql user account doesn't have LOCK/UNLOCK privileges. This is common in a shared hosting environment. You can try contacting your host, but if they're any good you won't get anywhere, (unless it's just you on the box and you're paying them a lot of money).

For the initial data import, just comment out/remove all the LOCK/UNLOCK entries in your SQL and you should be able to import without problem, as long as no one else is accessing your tables while the import is happening. (aka. keep your application offline until the import is done)