Jump to content

[Solved] Can't View New Database In Phpmyadmin, And Importing Doesn't Work


Zumurud

Recommended Posts

Hello. I couldn't figure out if this belongs in the questions section or customer support, so I apologize if it's in the wrong place.

 

When I tried to view my database created in cPanel, I couldn't find it, so I ran softalicious/joomla to automatically create a database, and I cannot view that one either. All I can see is information_schema. I also cannot see the panel on the left which lists the databases, I don't know if that is intentional or not.

(screenshot: http://oi40.tinypic.com/1zgg854.jpg)

 

 

I am trying to import my database from my old host, so I can move my website, but I keep getting this error.

 

.sql backup says:

 

Error
SQL query:
--
-- Database: `****x10h_******`
--
-- --------------------------------------------------------
--
-- Table structure for table `***_assets`
--
CREATE TABLE IF NOT EXISTS `ima_assets` (
`id` int( 10 ) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary Key',
`parent_id` int( 11 ) NOT NULL DEFAULT '0' COMMENT 'Nested set parent.',
`lft` int( 11 ) NOT NULL DEFAULT '0' COMMENT 'Nested set lft.',
`rgt` int( 11 ) NOT NULL DEFAULT '0' COMMENT 'Nested set rgt.',
`level` int( 10 ) unsigned NOT NULL COMMENT 'The cached level in the nested tree.',
`name` varchar( 50 ) NOT NULL COMMENT 'The unique name for the asset.\n',
`title` varchar( 100 ) NOT NULL COMMENT 'The descriptive title for the asset.',
`rules` varchar( 5120 ) NOT NULL COMMENT 'JSON encoded access control.',
PRIMARY KEY ( `id` ) ,
UNIQUE KEY `idx_asset_name` ( `name` ) ,
KEY `idx_lft_rgt` ( `lft` , `rgt` ) ,
KEY `idx_parent_id` ( `parent_id` )
) ENGINE = InnoDB DEFAULT CHARSET = utf8 AUTO_INCREMENT =56;
MySQL said: Documentation
#1046 - No database selected

 

XML backup says:

 

Error
SQL query:
&--#60;?xml version="1.0" encoding="utf-8"?&--#62; &--#60;!-- - phpMyAdmin XML Dump - version 3.5.5 - http://www.phpmyadmin.net - - Host: localhost - Generation Time: Aug 04, 2013 at 03:56 PM - Server version: 5.1.68 - PHP Version: 5.3.22 --&--#62; &--#60;pma_xml_export version="1.0" xmlns:pma="http://www.phpmyadmin.net/some_doc_url/"&--#62; &--#60;!-- - Structure schemas --&--#62; &--#60;pma:structure_schemas&--#62; &--#60;pma:database name="****x10h_******" collation="utf8_general_ci" charset="utf8"&--#62; &--#60;pma:table name="ima_assets"&--#62; CREATE TABLE `ima_assets` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary Key', `parent_id` int(11) NOT NULL DEFAULT '0' COMMENT 'Nested set parent.', `lft` int(11) NOT NULL DEFAULT '0' COMMENT 'Nested set lft.', `rgt` int(11) NOT NULL DEFAULT '0' COMMENT 'Nested set rgt.', `level` int(10) unsigned NOT NULL COMMENT 'The cached level in the nested [...]
MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '&--#60;?xml version="1.0" encoding="utf-8"?&--#62;
&--#60;!--
- phpMyAdmin XML Dump
- version 3' at line 1

Link to comment
Share on other sites

The .sql backup failed because you tried importing it without selecting a database first. Normally, you select the database in phpmyadmin, then you import, although that's a bit hard to do with your databases not appearing...

 

The XML backup has syntax errors. If all those HTML entities (the #62; & and similar) are actually in your file as the error suggests, that's the reason. Those need to be converted to actual characters. Not sure what the easiest fix for that is...most of the tools online that do the conversion are for small text strings, not large DB backups.

 

As for the databases not appearing in phpmyadmin, have you tried clearing your cache or using another browser? If so and you saw no change, an administrator would be able to help you more with that.

Link to comment
Share on other sites

What happens if you run

SELECT * FROM `cpuser_dbname`.`Table`;

in the SQL tab, replacing cpuser with your cPanel username, dbname with the name of your database, and Table with a table in your database.

Link to comment
Share on other sites

The .sql backup failed because you tried importing it without selecting a database first. Normally, you select the database in phpmyadmin, then you import, although that's a bit hard to do with your databases not appearing... The XML backup has syntax errors. If all those HTML entities (the #62; & and similar) are actually in your file as the error suggests, that's the reason. Those need to be converted to actual characters. Not sure what the easiest fix for that is...most of the tools online that do the conversion are for small text strings, not large DB backups. As for the databases not appearing in phpmyadmin, have you tried clearing your cache or using another browser? If so and you saw no change, an administrator would be able to help you more with that.
Phpmyadmin generated both files, so it should be able to read it, right? I'm new to mysql.

 

I still can't see my database in the list and clearing the cache didn't help. I can view phpmyadmin normally on my other hosts, but not heliohost.

 

 

What happens if you run
 SELECT * FROM `cpuser_dbname`.`Table`; 

in the SQL tab, replacing cpuser with your cPanel username, dbname with the name of your database, and Table with a table in your database.

#1142 - SELECT command denied to user '****_****'@'localhost' for table '***_associations'
Link to comment
Share on other sites

Phpmyadmin generated both files, so it should be able to read it, right? I'm new to mysql. I still can't see my database in the list and clearing the cache didn't help. I can view phpmyadmin normally on my other hosts, but not heliohost.

You'd think, but not always. HTML entities generally aren't valid in SQL commands (except as field data). The .sql dump isn't broken. Once the issue with not seeing your databases is fixed, you should be able to use that to restore the database.

 

As for not phpmyadmin not showing normally on HH, it does sound like a problem with the server. I just wanted to make sure the browser wasn't acting up. Caches that are corrupt or stale can cause several different issues, so clearing it is always a good first step when something breaks.

Link to comment
Share on other sites

Your account, your databases, and your phpmyadmin have been tested and all appear to be working fine.

 

Since testing phpmyadmin requires changing your account password you should have received an email at your contact email address containing your new password. Please use this password contained within the email to log into your account, and then you can change your password once you're successfully logged in.

 

My guess is your cpanel password and your mysql password were no longer in sync and when phpmyadmin tried to log into mysql using your cpanel password it was denied access. When I manually changed your password it caused both cpanel and mysql passwords to be synced to the same value again thereby fixing the issue before I could even verify that it existed.

 

Let us know if you're having any issues getting logged in or any other issues with your account.

Link to comment
Share on other sites

Thanks for your help. I can now see my database. I tried again to import my database tables, and it worked, but I am getting this error when trying to connect to joomla:

 

Database connection error (2): Could not connect to MySQL.

 

I went into the configuration.php and changed the database and password to match my own, and I also changed the database names in the .sql file, so I can't figure out why it does not work.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...