Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I tried creating new database direct on phymyadmin without success. Google search informed me that it needs creating MySQL cPanel on Phpmyadmin. But I couldn't figure out how to do it. Please help.
I tried creating new database direct on phymyadmin without success. Google search informed me that it needs creating MySQL cPanel on Phpmyadmin. But I couldn't figure out how to do it. Please help.
TIA
satimis
"without success" is pretty vague.
You want to create a cpanel database or what exactly?
Are you installing cpanel/Whm?
Code:
create database cpanel;
in phpmyadmin doesn't execute?
Is Phpmyadmin setup correctly/installed?
You have root shell access or is this shared hosting?
We need way more info than " Google search informed me that it needs creating MySQL cPanel on Phpmyadmin"
I can't find a way creating new database as described on the article.
phpmyadmin, aparche2 and MySQL are running. I can ran MySQL commands on terminal creating new database. The live website has been exported from phpmyadmin on Godaddy server to local server.
Followings are the screenshots of local phpmyadmin.
Highligh -wordpress
Screenshot_20140107_wordpress.png (on next posting because only 3 files allowed)
On highting "test" -> Import (download database - "__DB__.sql.zip"
Warning:
Code:
Error
SQL query:
--
-- Database: `information_schema`
--
CREATE DATABASE `information_schema` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
MySQL said: Documentation
#1044 - Access denied for user 'wordpress'@'localhost' to database 'information_schema'
Try exporting the data without the "create database" statement, there may be an option for that, I can't be bothered looking up phpmyadmin.
There is ONE option on Export
Code:
Database export options
Add DROP DATABASE
I haven't checked this option.
Quote:
Create the database as "root" or another privileged user on the new server.
Ran following commands creating the database on local server
Code:
$ mysql -u root -p
mysql> CREATE USER wordpress@localhost IDENTIFIED BY "password";
mysql> create database wordpress;
mysql> GRANT ALL ON wordpress.* TO wordpress@localhost;
mysql> FLUSH PRIVILEGES;
mysql> exit
Quote:
Grant the wordpress@localhost privs on the new database.
I don't expect adding user 'wordpress@localhost' to the database of the Live website on Godaddy server. I created a new user on the database of local website with following commands
Code:
$ mysql -u root -p
mysql> USE wordpress;
Database changed
mysql> CREATE USER sat1318107320909 IDENTIFIED BY "password";
mysql> GRANT ALL ON wordpress.* TO sat1318107320909;
mysql> FLUSH PRIVILEGES;
mysql> exit
USER "sat1318107320909" is on Live database
Quote:
Try the import.
Still failed.
Warning:
Code:
Error
SQL query:
--
-- Database: `sat1318107320909`
--
CREATE DATABASE `sat1318107320909` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
MySQL said: Documentation
#1044 - Access denied for user 'wordpress'@'localhost' to database 'sat1318107320909'
I think I can't do the other way round instead.
Quote:
Or, run the import as "root"
Pls advise how to run it? Thanks
Edit
====
I got it. Login phpmyadmin as root with MySQL root password
Code:
Import has been successfully finished, 389 queries executed. (__DB__.sql.zip)
Ran following commands creating the database on local server
Code:
$ mysql -u root -p
mysql> CREATE USER wordpress@localhost IDENTIFIED BY "password";
mysql> create database wordpress;
mysql> GRANT ALL ON wordpress.* TO wordpress@localhost;
mysql> FLUSH PRIVILEGES;
mysql> exit
I don't expect adding user 'wordpress@localhost' to the database of the Live website on Godaddy server. I created a new user on the database of local website with following commands
Code:
$ mysql -u root -p
mysql> USE wordpress;
Database changed
mysql> CREATE USER sat1318107320909 IDENTIFIED BY "password";
mysql> GRANT ALL ON wordpress.* TO sat1318107320909;
mysql> FLUSH PRIVILEGES;
mysql> exit
USER "sat1318107320909" is on Live database
Still failed.
Warning:
Code:
Error
SQL query:
--
-- Database: `sat1318107320909`
--
CREATE DATABASE `sat1318107320909` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
MySQL said: Documentation
#1044 - Access denied for user 'wordpress'@'localhost' to database 'sat1318107320909'
I think I can't do the other way round instead.
Pls advise how to run it? Thanks
root@MyKungFu:~# mysql
Edit
====
I got it. Login phpmyadmin as root with MySQL root password
Code:
Import has been successfully finished, 389 queries executed. (__DB__.sql.zip)
Will come back later
Rgds
satimis
as root:
unzip the __DB__.sql.zip file, you only need the .sql inside it...
Code:
root@localhost:~ # mysql wordpress < /path/to/file.sql
now test your privileges:
Code:
mysql -usat1318107320909 -ppassword <enter>
show databases;
I would guess that your actual wordpress data is in the sat1318107320909 database as there is the "create" statement in your .sql file, I'm also guessing that there's a use sat1318107320909 in there that loads all the data into that database instead of the one you specify on the command line.
Give your wordpress@localhost user permissions on the sat1318107320909 database and use that as the database name in your wordpress config.
I would guess that your actual wordpress data is in the sat1318107320909 database as there is the "create" statement in your .sql file, I'm also guessing that there's a use sat1318107320909 in there that loads all the data into that database instead of the one you specify on the command line.
Give your wordpress@localhost user permissions on the sat1318107320909 database and use that as the database name in your wordpress config.
$ mysql -u root -p
mysql> show databases;
Code:
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sat1318107320909 |
| test |
| wordpress |
+--------------------+
6 rows in set (0.03 sec)
Whether run following commands to add user wordpress@localhost to sat1318107320909 database ?
Code:
mysql> USE sat1318107320909;
mysql> CREATE USER wordpress@localhost IDENTIFIED BY "password";
mysql> GRANT ALL ON sat1318107320909.* TO wordpress@localhost;
mysql> FLUSH PRIVILEGES;
mysql> exit
Whether run following commands to add user wordpress@localhost to sat1318107320909 database ?
Code:
mysql> USE sat1318107320909;
mysql> CREATE USER wordpress@localhost IDENTIFIED BY "password";
mysql> GRANT ALL ON sat1318107320909.* TO wordpress@localhost;
mysql> FLUSH PRIVILEGES;
mysql> exit
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.