So, I export an SQL database from another pc that hosts my website(sucessfully appearing the tab of the site that is responsible for the sql table).
But on my pc, I cannot get it to work. So it got to be a configurations error, something to do with privileges, or the sql database file.
When I import a Database from phpmyadmin for hosting my website I get this error.
CREATE DATABASE `information_schema` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
MySQL said: Documentation
#1044 - Access denied for user 'root'@'localhost' to database 'information_schema'
SO, I go and delete the line
CREATE DATABASE `information_schema` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
The DataBases however are being imported and they have the necessary data in them. But, I go on deleting all the imported Databases except information_schema, phpmyadmin and mysql who I cannot delete.
I load my Database again without this line and this time a get this error :
Error
SQL query:
-- --------------------------------------------------------
--
-- Table structure for table `CHARACTER_SETS`
--
CREATE TEMPORARY TABLE `CHARACTER_SETS` (
`CHARACTER_SET_NAME` varchar( 32 ) NOT NULL DEFAULT '',
`DEFAULT_COLLATE_NAME` varchar( 32 ) NOT NULL DEFAULT '',
`DESCRIPTION` varchar( 60 ) NOT NULL DEFAULT '',
`MAXLEN` bigint( 3 ) NOT NULL DEFAULT '0'
) ENGINE = MEMORY DEFAULT CHARSET = utf8;
MySQL said: Documentation
#1044 - Access denied for user 'root'@'localhost' to database 'information_schema'
THis sql Database is 2.9 MB so in order to import it, I zip it and import it as a compressed .zip file.
This question is a followup from this question, when I realized that my problem is not on the php code as it works on another pc by another person(with whom I do not have contact with).
Thanks in advance.
PS: I performed those as well. The problem remains.
mysql> GRANT ALL PRIVILEGES ON * . * TO 'root'@'localhost';
Query OK, 0 rows affected (0.00 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
About the "mysql" database, this contains MySQL accounts and privileges information. So you should not import this, however it may contain a MYSQL account necessary for your application. About the "phpmyadmin" database, this contains the phpMyAdmin configuration storage and I suggest to not import it because it's too specific to the original host.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.