Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Importing sql file using phpmyadmin in EasyPHP

Tags:

I have a website written in php and mysql (written by someone else) and I need to alter it- just for your interest it is bridgetjonesart.co.uk. So I thought I would download it to my desktop pc and use easy php and mysql locally to make changes then upload it again.

I have the sql database as a file 'runningc_bjart.sql' in the root directory. I first use php admin to create a database of the same name as the orginal and then use import ... one table appears to be created but then getting an error... Error

SQL query: DocumentationEdit Edit  SELECT  `comment`  FROM  `phpmyadmin`.`pma_column_info`  WHERE db_name =  'runningc_bjart' AND table_name =  '' AND column_name =  '(db_comment)'  MySQL said: Documentation  #1100 - Table 'pma_column_info' was not locked with LOCK TABLES  ---------  Error SQL query: DocumentationEdit Edit  SELECT  `comment`  FROM  `phpmyadmin`.`pma_column_info`  WHERE db_name =  'runningc_bjart' AND table_name =  '' AND column_name =  '(db_comment)'  MySQL said: Documentation  #1100 - Table 'pma_column_info' was not locked with LOCK TABLES  

I am not sure what to try next, any help would be really appreciated. Thank you. Bridget

like image 686
Bridget Jones Avatar asked Aug 13 '13 17:08

Bridget Jones


People also ask

How do I import a large SQL file into phpMyAdmin using CMD?

Ok you use PHPMyAdmin but sometimes the best way is through terminal: Connect to database: mysql -h localhost -u root -p (switch root and localhost for user and database location) Start import from dump: \. /path/to/your/file. sql.

Can we import database in phpMyAdmin?

To import data into a specific database or table, open the database or table before going to the “Import” tab. In addition to the standard Import and Export tab, you can also import an SQL file directly by dragging and dropping it from your local file manager to the phpMyAdmin interface in your web browser.


2 Answers

Having wasted many hours, I have a solution so here it is.

Having a look on the web I found I needed to change my config.inc.php file in the phpadmin directory as I was running EasyPHP 13.1 password slightly diff to that mentioned in the blog at http://amir-shenodua.blogspot.co.uk/2012/03/error-while-importing-db-in-mysql.html. I added 2 lines:

$cfg['Servers'][$i]['controluser'] = 'root'; $cfg['Servers'][$i]['controlpass'] = ''; 

So all sorted !! Yippee!!

So if you have trouble please read:
http://amir-shenodua.blogspot.co.uk/2012/03/error-while-importing-db-in-mysql.html

like image 102
Bridget Jones Avatar answered Nov 03 '22 14:11

Bridget Jones


For temporary relief:

Comment out this line in your config.inc.php file (place // before the line)

$cfg['Servers'][$i]['pmadb'] = $dbname; 

Then close all browsers. Try importing again.

like image 27
user3980196 Avatar answered Nov 03 '22 13:11

user3980196