Go Back   HostGator Peer Support Forums > HostGator Peer Support Forums > Shared Hosting Support

Notices

Reply
 
Thread Tools
  #1  
Old 06-22-2007, 03:38 AM
patwa patwa is offline
Junior Croc
 
Join Date: Feb 2007
Location: Aberdeen, UK
Posts: 194
Default Creating MySQL Databases from the command line - permission denied

OK, in my bid to learn more and stay on my Unix high, I decided to install my new CMS purely through SSH.

I found a tutorial on using mysql through the command line.

mysql -u username -p - OK.

CREATE DATABASE e107; - Error 1004 - Access denied for username username at localhost to database e107.

What am I doing wrong? I tried using the \g to send the command as well, as defined in the MySQL help page, but no go.

Thanks.

H.
__________________
PatwaNet - Innovative Evolution

Last edited by patwa; 06-22-2007 at 03:42 AM.
Reply With Quote
  #2  
Old 06-22-2007, 05:27 AM
gooshy gooshy is offline
Hatchling Croc
 
Join Date: Feb 2007
Posts: 27
Default Re: Creating MySQL Databases from the command line - permission denied

Hi,Just from looking at the error message the user you are logged in as does not have permission to create databases. Try and create one through cpanel, which runs under a different user. Then create a user to access the database through cpanel grant the relevant permissions and log into the database with your new user at the commans line.

Last edited by gooshy; 06-22-2007 at 05:30 AM. Reason: corretion
Reply With Quote
  #3  
Old 06-22-2007, 10:14 AM
Sam Sam is offline
Emperor Croc
 
Join Date: Jan 2007
Location: /bin/false
Posts: 3,057
Default Re: Creating MySQL Databases from the command line - permission denied

patwa,

I dont think you can create mysql database's in jailshell
Reply With Quote
  #4  
Old 06-22-2007, 12:10 PM
patwa patwa is offline
Junior Croc
 
Join Date: Feb 2007
Location: Aberdeen, UK
Posts: 194
Default Re: Creating MySQL Databases from the command line - permission denied

Quote:
Originally Posted by _Sam_ View Post
patwa,

I dont think you can create mysql database's in jailshell
Ah that would make sense then if it was a 'global' ban on database creation. Seeing as the user I was logge din as was myself, it couldn't have been a user specific issue. Anyone able to advise what I can do with jailshell as regards mysql, I already know about importing and exporting databases? It's so much easier than using the cpanel gui.
__________________
PatwaNet - Innovative Evolution
Reply With Quote
  #5  
Old 06-22-2007, 01:43 PM
charlesgan's Avatar
charlesgan charlesgan is offline
Swamp Croc
 
Join Date: Mar 2007
Location: http://www.hostgatorreview.org/
Posts: 372
Default Re: Creating MySQL Databases from the command line - permission denied

CREATE DATABASE `dbname_here` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
USE `db_username`;

you need to set the user name that used to create the db
__________________
Charles Gan
Hostgatorreview.org
Reply With Quote
  #6  
Old 06-29-2007, 05:20 PM
patwa patwa is offline
Junior Croc
 
Join Date: Feb 2007
Location: Aberdeen, UK
Posts: 194
Default Re: Creating MySQL Databases from the command line - permission denied

Thanks, will try this.

Cheers.

H.
__________________
PatwaNet - Innovative Evolution
Reply With Quote
Reply

Bookmarks

Thread Tools

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

Forum Jump

All times are GMT -5. The time now is 01:00 PM.