LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   How to create MySQL cPanel on Phpmyadmin (https://www.linuxquestions.org/questions/linux-general-1/how-to-create-mysql-cpanel-on-phpmyadmin-4175490377/)

satimis 01-06-2014 10:35 PM

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

Habitual 01-07-2014 08:07 AM

Quote:

Originally Posted by satimis (Post 5093279)
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

satimis 01-07-2014 09:27 AM

3 Attachment(s)
Quote:

Originally Posted by Habitual (Post 5093500)
"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

satimis 01-07-2014 09:29 AM

1 Attachment(s)
Highligh -wordpress
Screenshot_20140107_wordpress.png

TenTenths 01-07-2014 09:37 AM

Quote:

Originally Posted by satimis (Post 5093542)
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.

satimis 01-07-2014 10:22 AM

1 Attachment(s)
Quote:

Originally Posted by TenTenths (Post 5093548)
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

TenTenths 01-07-2014 10:26 AM

Quote:

Originally Posted by satimis (Post 5093577)
Whether I made any mistake? Thanks

Yeah, don't export the information_schema database.

satimis 01-07-2014 10:52 AM

2 Attachment(s)
Quote:

Originally Posted by TenTenths (Post 5093579)
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

TenTenths 01-07-2014 11:02 AM

Quote:

Originally Posted by satimis (Post 5093588)
-> 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"

satimis 01-07-2014 11:02 PM

Quote:

Originally Posted by TenTenths (Post 5093596)
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

Habitual 01-08-2014 08:16 AM

Quote:

Originally Posted by satimis (Post 5094008)
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.

satimis 01-08-2014 09:02 AM

2 Attachment(s)
Quote:

Originally Posted by Habitual (Post 5094270)
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

TenTenths 01-08-2014 09:06 AM

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.

satimis 01-08-2014 09:30 AM

Quote:

Originally Posted by TenTenths (Post 5094304)
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

TenTenths 01-08-2014 09:33 AM

Quote:

Originally Posted by satimis (Post 5094318)
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.


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