LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 01-06-2014, 10:35 PM   #1
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Rep: Reputation: 56
How to create MySQL cPanel on Phpmyadmin


Hi all,

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
 
Old 01-07-2014, 08:07 AM   #2
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by satimis View Post
Hi all,

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"

http://forums.cpanel.net/f5/unable-c...in-183431.html

Last edited by Habitual; 01-07-2014 at 08:09 AM.
 
Old 01-07-2014, 09:27 AM   #3
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by Habitual View Post
"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"

http://forums.cpanel.net/f5/unable-c...in-183431.html
Hi,

Thanks for your advice.

I'm administrator. I was following below article cloning live website on Godday to local server;

How to Clone Your Live WordPress Blog to a Local Server
http://www.maketecheasier.com/clone-...-local-server/

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.

Screenshot_20140107_01.png

Highlight – information_schema
Screenshot_20140107_info_schema.png

Highlight – test
Screenshot_20140107_test.png

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'

Rgds
satimis
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20140107_01.png
Views:	41
Size:	116.9 KB
ID:	14429   Click image for larger version

Name:	Screenshot_20140107_info_schema.png
Views:	40
Size:	222.9 KB
ID:	14430   Click image for larger version

Name:	Screenshot_20140107_test.png
Views:	39
Size:	50.9 KB
ID:	14431  
 
Old 01-07-2014, 09:29 AM   #4
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Highligh -wordpress
Screenshot_20140107_wordpress.png
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20140107_wordpress.png
Views:	36
Size:	200.4 KB
ID:	14432  
 
Old 01-07-2014, 09:37 AM   #5
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,475

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
Quote:
Originally Posted by satimis View Post
Code:
--
-- Database: `information_schema`
--
CREATE DATABASE `information_schema` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
information_schema is an "internal" MySQL database, it has nothing to do with wordpress.

Try backup up and restoring only your wordpress database.
 
1 members found this post helpful.
Old 01-07-2014, 10:22 AM   #6
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by TenTenths View Post
information_schema is an "internal" MySQL database, it has nothing to do with wordpress.

Try backup up and restoring only your wordpress database.
Hi,

On phpmyadmin (Godaddy server)
Export

Following items are checked as default
[check] SQL

Structure
[check] Add AUTO_INCREMENT value
[check] Enclose table and field names with backquotes

Data
[check] Use hexadecimal for BLOB


According to the article:-
How to Clone Your Live WordPress Blog to a Local Server
http://www.maketecheasier.com/clone-...-local-server/
[check] zipped

(see attached file)

Whether I made any mistake? Thanks

satimis
Attached Thumbnails
Click image for larger version

Name:	Screenshot_export.png
Views:	31
Size:	102.3 KB
ID:	14433  
 
Old 01-07-2014, 10:26 AM   #7
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,475

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
Quote:
Originally Posted by satimis View Post
Whether I made any mistake? Thanks
Yeah, don't export the information_schema database.
 
Old 01-07-2014, 10:52 AM   #8
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by TenTenths View Post
Yeah, don't export the information_schema database.
There are 2 items there:
(see Screenshot_unselect_all.png)

Select only the database - sat1318107320909
-> Export


-> import
error
(see Screenshot_error_sat1318.png)

satimis
Attached Thumbnails
Click image for larger version

Name:	Screenshot_unselect_all.png
Views:	35
Size:	20.0 KB
ID:	14434   Click image for larger version

Name:	Screenshot_error_sat1318.png
Views:	32
Size:	29.1 KB
ID:	14435  

Last edited by satimis; 01-07-2014 at 10:53 AM.
 
Old 01-07-2014, 11:02 AM   #9
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,475

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
Quote:
Originally Posted by satimis View Post
-> import
error
(see Screenshot_error_sat1318.png)
Read the error message it states EXACTLY what the problem is. Your MySQL user "wordpress" doesn't have permissions to create a database.
  1. Try exporting the data without the "create database" statement, there may be an option for that, I can't be bothered looking up phpmyadmin.
  2. Create the database as "root" or another privileged user on the new server.
  3. Grant the wordpress@localhost privs on the new database.
  4. Try the import.

Or, run the import as "root"

Last edited by TenTenths; 01-07-2014 at 11:03 AM.
 
Old 01-07-2014, 11:02 PM   #10
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by TenTenths View Post
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)
Will come back later

Rgds
satimis

Last edited by satimis; 01-08-2014 at 04:15 AM.
 
Old 01-08-2014, 08:16 AM   #11
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by satimis View Post
There is ONE option on Export
Code:
Database export options
Add DROP DATABASE
I haven't checked this option.


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;
you should 'see' the wordpress database.
 
Old 01-08-2014, 09:02 AM   #12
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by Habitual View Post
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;
you should 'see' the wordpress database.
Performed following steps:-

satimis@mint16ssd00 ~ $ cd Downloads/
satimis@mint16ssd00 ~/Downloads $ ls
Code:
__DB__.sql.zip
satimis@mint16ssd00 ~/Downloads $ unzip __DB__.sql.zip
Code:
Archive:  __DB__.sql.zip
  inflating: __DB__.sql
satimis@mint16ssd00 ~/Downloads $ ls
Code:
__DB__.sql
__DB__.sql.zip
satimis@mint16ssd00 ~/Downloads $ su
Password:
mint16ssd00 Downloads # mysql wordpress < /home/satimis/Downloads/__DB__.sql
Code:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
That article seems not work for me.

Login phpmyadmin as user - wordpress
the import database not showing up

see Screenshot_phpmyadmin_wordpress.png

Login phpmyadmin as root
the import database showing up

see Screenshot_phpmyadmin_root.png

On browser
http://localhost/wordpress/wp-login.php
Error establishing a database connection


satimis
Attached Thumbnails
Click image for larger version

Name:	Screenshot_phpmyadmin_wordpress.png
Views:	35
Size:	121.7 KB
ID:	14443   Click image for larger version

Name:	Screenshot_phpmyadmin_root.png
Views:	34
Size:	131.6 KB
ID:	14445  
 
Old 01-08-2014, 09:06 AM   #13
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,475

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
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.
 
Old 01-08-2014, 09:30 AM   #14
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by TenTenths View Post
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
?

Thanks

satimis
 
Old 01-08-2014, 09:33 AM   #15
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,475

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
Quote:
Originally Posted by satimis View Post
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
?

Thanks

satimis
Yeah, looks right, try it and see how it goes.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL backups cpanel style SeSoX Linux - Server 5 01-11-2011 06:31 AM
How to create subdomain in linux without having cpanel. vinoth.t Linux - Newbie 1 10-19-2010 03:18 PM
phpmyadmin shows blank page; no "phpmyadmin" database in mysql qajaq Linux - Software 2 12-20-2009 12:23 PM
Cpanel/WHM Died at /usr/local/cpanel/Cpanel/Hulk.pm line 92. liang3391 Linux - Software 1 06-22-2009 02:02 PM
cPanel & mySQL directories Alan Powell Linux - Newbie 1 04-26-2004 06:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration