|
| Support Queries This forum should be used to contact our support team should you have any problems with your account. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
(#1 (permalink))
|
| Hi ![]() Posts: 8 Join Date: Sep 2006 Location: Cambridge | On one of my accounts, fovi.co.uk (in the reseller package), I've created a new MySQL database, and I've added a user. However, when I add the user privelleges I get this error: Connection Strings Perl $dbh = DBI->connect("DBI:mysql:fovi_cms:localhost","fovi_1"," "); PHP $dbh=mysql_connect ("localhost", "fovi_1", "") or die ('I cannot connect to the database because: ' . mysql_error()); mysql_select_db ("fovi_cms"); And in phpMyAdmin, it won't let me create tables or run SQL queries or anything. What's the problem? Thanks, Ovie </td></tr></tbody></table> |
| |
(#2 (permalink))
|
| Techie & Moderator ![]() Posts: 764 Join Date: Apr 2006 Location: Swindon, UK | That isn't an error; that is simply providing you with the connection strings in perl and php required to connect to and use your database. The appearance of those strings actually means that your database and the user permissions for it are setup correctly. As for what you cannot do in phpmyadmin, I assume you have checked the phpMyAdmin docs to check you are attempting to add tables the correct way? |
| |
(#3 (permalink))
|
| Hi ![]() Posts: 8 Join Date: Sep 2006 Location: Cambridge | Quote:
I'm following a CMS tutorial, and I need to add this: Code: CREATE TABLE `databasename`.`cmsarticles` ( `ID` int(6) unsigned NOT NULL auto_increment COMMENT 'The unique ID of the article', `title` varchar(200) NULL COMMENT 'The article title', `tagline` varchar(255) NULL COMMENT 'Short summary of the article', `section` int(4) NULL DEFAULT 0 COMMENT 'The section of the article', `thearticle` text NULL COMMENT 'The article itself', PRIMARY KEY (`ID`) ); How would I use that code? | |
| |
(#4 (permalink))
|
| User ![]() Posts: 23 Join Date: Aug 2006 Location: N. Wales | According to the above the user "fovi_1" doesn't have a password. I wouldn't be surprised if phpMyAdmin doesn't like this situation and its not a good idea from a security point of view anyway. The phpMyAdmin problem sounds like some strange privilages problem. You could be trying to create tables in a database your user doesn't have access to. |
| |
(#6 (permalink))
|
| XILO Staff ![]() Posts: 171 Join Date: Nov 2005 | Quote:
This can be done (or has to be done) via cPanel. Tom Internet Hosting and Online Services w: http://www.xilo.net/ h: http://my.xilo.net/ t: +44 (0) 845 034 6444 f: +44 (0) 845 034 6555 | |
| |
(#7 (permalink))
|
| Hi ![]() Posts: 8 Join Date: Sep 2006 Location: Cambridge | I've assigned all permissions, I've also set passwords, and I've tried it numerous times...deleting recreating accounts and databases etc. In phpmyadmin it says that I don't have the permission, but I did assign "all" for the user I created. And when I try to sign out in phpmyadmin, it says "user name and password invalid". |
| |
(#8 (permalink))
|
| Techie & Moderator ![]() Posts: 764 Join Date: Apr 2006 Location: Swindon, UK | That message when you sign out is normal as authentication for phpMyAdmin is provided by CPanel, as is signing out. My best advice to you is to delete the user and the database in CPanel, clear your browser cache, and then start over doing the following:- 1. Setup a database in cpanel 2. Setup a username that is different to the database name and with a password. 3. Assign that user to the database with "ALL" permissions 4. Make sure the database name and username are different to before. 5. Using phpMyAdmin select the database you have just created using the link/drop-down menu on the left. 6. Run queries on the SQL tab that appears in the right pane on the top. That *should* all work. If it still doesn't post here again ![]() Things you might also check:- - Has the whole cpanel account (created by your reseller username) got MySQL access and phpMyAdmin access? Check the feature lists. - Have you got any other CPanel sessions running |
| |
(#10 (permalink))
|
| Techie & Moderator ![]() Posts: 764 Join Date: Apr 2006 Location: Swindon, UK | Right, I've got it. That was no snitch of an error to track down I tell you ![]() I've recreated it and its your SQL that is wrong. To create the table you want to create you need to use the SQL tab as you have been doing, but use the following code: Code: CREATE TABLE `cmsarticles` ( `ID` int(6) unsigned NOT NULL auto_increment COMMENT 'The unique ID of the article', `title` varchar(200) NULL COMMENT 'The article title', `tagline` varchar(255) NULL COMMENT 'Short summary of the article', `section` int(4) NULL DEFAULT 0 COMMENT 'The section of the article', `thearticle` text NULL COMMENT 'The article itself', PRIMARY KEY (`ID`) ); When you use phpMyAdmin to run queries you should only specify table names, never database names in your SQL. Hope this helps ![]() |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Powered by vBulletin | XHTML | © Copyright 2003-2009 XILO Communications Ltd. All rights reserved. E&OE