By sambino-1 on
Hi, I'm using CPanel to set up my database and users, I think I've done everything correctly (i.e. edited my conf.php etc) but I get the following error:
Fatal error: Table 'tssh_drupalsam.users' doesn't exist query: SELECT u.*, s.* FROM users u INNER JOIN sessions s ON u.uid = s.uid WHERE s.sid = '6e5c41211090e17a588bad249ca3eb48' AND u.status < 3 LIMIT 0, 1 in /home/prefix/public_html/drupal/includes/database.mysql.inc on line 125
None of the other forum topics covering this error seem to relate to CPanel - can anyone help?
Thanks!
Comments
Problem with table name in conf.php
You have supplied an invalid or nonexistant tablename in conf.php.
You need to copy the table name, exactly as it appears in cpanel, to the end of your $db_url in conf.php. Note that cpanel seems to insist on appending your username to the beginning of all mysql tables you create.
Also, you should have imported the database.mysql file using either the command "mysql" from the shell or phpmyadmin. (probably phpmyadmin would be easier since I think it's included with cpanel)
thanks for the speedy reply,
thanks for the speedy reply, TDobes, but I've checked, rechecked, made new tables and users and copied the names directly into the conf.php code - I'm 100% sure this is not the problem.
However, maybe the second thing you mentioned is causing the issue - my CPanel doesn't have phpMyAdmin though. Is there another way to do this that a complete newbie can understand? (I've set up many blogs using other blogging software, so I'm not a total bimbo, just very new to Drupal)
Thanks!
Need to create tables somehow
Are you sure that your cpanel install doesn't have phpmyadmin? It took me a while to find it on my install... it's a small link at the bottom of the "mysql database" page (where you create tables and users).
You can also create the tables using shell access (probably via ssh), if your host provides it. Then you'd do something like:
mysql -u your_username -p your_tablename < database/database.mysql(this is step #3 in the Drupal Installation instructions)
Otherwise, you'll have to set up some sort of program to create the tables. Perhaps you could manually install phpmyadmin temporarily? There may be other, simpler programs that could accomplish it too, but I've not worked with them before.
hey TDobes, you are my new
hey TDobes, you are my new best friend, that worked perfectly - cheers.
I thought PHPMyAdmin was meant to be a link from the index of CPanel, thanks again!
Other causes
If anyone else runs into this problem, I thught this tip might be useful:
I got the same problem restoring a site's database from a phpMyAdmin dump, which iread into a different MySQL server. Turned out the dump had CR instead of LF characters terminating the lines. The DB table names looked just fine, but it just didn't work.
I fixed it by deleting the database, then converting the dump file using (unix command)
tr \\r \\n <mysqldump.sql > mysqldump.fixed.mysqlthen recreated the database.
Worked no problems.