1
Anonymous
Need MySQL advice.....
  • 2007/5/14 17:38

  • Anonymous

  • Posts: 0

  • Since: 0


Hi gang - sorry if this is in the wrong section or even inappropriate for these Forums but it is related to the the database that I use for my XOOPS site......

The following is the first few lines of a PhpMyAdmin databse dump:

le="color: #000000"><?php -- MySQL dump 10.9 -- -- Host: localhost Database: databasename -- ------------------------------------------------------ -- Server version 4.1.20 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -- -- Table structure for table `wibble_avatar` -- DROP TABLE IF EXISTS `wibble_avatar`; CREATE TABLE `wibble_avatar` ( `avatar_id` mediumint(8) unsigned NOT NULL auto_increment, `avatar_file` varchar(30) NOT NULL default '', `avatar_name` varchar(100) NOT NULL default '', `avatar_mimetype` varchar(30) NOT NULL default '', `avatar_created` int(10) NOT NULL default '0', `avatar_display` tinyint(1) unsigned NOT NULL default '0', `avatar_weight` smallint(5) unsigned NOT NULL default '0', `avatar_type` char(1) NOT NULL default '', PRIMARY KEY (`avatar_id`), KEY `avatar_type` (`avatar_type`,`avatar_display`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -- Dumping data for table `wibble_avatar` -- /*!40000 ALTER TABLE `wibble_avatar` DISABLE KEYS */; LOCK TABLES `wibble_avatar` WRITE; UNLOCK TABLES; /*!40000 ALTER TABLE `wibble_avatar` ENABLE KEYS */;


Basically, when I try to get this database dump written to a new database it seems to fail at the first table, i.e. wibble_avatar (wibble is not the real db table prefix )

I get an error message which says:

#1044 - Access denied for user 'database'@'localhost' to database 'database'

I don't recall seeing the "LOCK TABLES" code before and I'm sure the inability to write to the new database is connected with this.

All advice gratefully received - many thanks

2
christian
Re: Need MySQL advice.....
  • 2007/5/14 19:55

  • christian

  • Just can't stay away

  • Posts: 401

  • Since: 2002/2/24


Does the user with which you are connected in phpmyadmin have rights admin on the new database ?

3
Anonymous
Re: Need MySQL advice.....
  • 2007/5/14 21:03

  • Anonymous

  • Posts: 0

  • Since: 0


I have admin rights.

I guess that what I'm asking is "Does that look like a normal "dump" file?" to you guys?

4
BlueStocking
Re: Need MySQL advice.....

I can't help you on yours but here is a dump of mind in the same area. I do not have any avatars in use on this site.
Good luck ... BlueStocking.

le="color: #000000"><?php -- phpMyAdmin SQL Dump -- version 2.8.0.1 -- http://www.phpmyadmin.net -- -- Host: server-xxxxx -- Generation Time: May 13, 2007 at 09:16 PM -- Server version: 4.1.21 -- PHP Version: 4.4.4 -- -- Database: `xxxxxxx` -- -- -------------------------------------------------------- -- -- Table structure for table `xxxxx_avatar` -- CREATE TABLE `xxxxx_avatar` ( `avatar_id` mediumint(8) unsigned NOT NULL auto_increment, `avatar_file` varchar(30) NOT NULL default '', `avatar_name` varchar(100) NOT NULL default '', `avatar_mimetype` varchar(30) NOT NULL default '', `avatar_created` int(10) NOT NULL default '0', `avatar_display` tinyint(1) unsigned NOT NULL default '0', `avatar_weight` smallint(5) unsigned NOT NULL default '0', `avatar_type` char(1) NOT NULL default '', PRIMARY KEY (`avatar_id`), KEY `avatar_type` (`avatar_type`,`avatar_display`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -- Dumping data for table `xxxxx_avatar` -- -- -------------------------------------------------------- -- -- Table structure for table `xxxxx_avatar_user_link` -- CREATE TABLE `xxxxx_avatar_user_link` ( `avatar_id` mediumint(8) unsigned NOT NULL default '0', `user_id` mediumint(8) unsigned NOT NULL default '0', KEY `avatar_user_id` (`avatar_id`,`user_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -- Dumping data for table `xxxxx_avatar_user_link` -- -- -------------------------------------------------------- --
hhttps://xoops.org/modules/repository .. It is time to get involved - XOOPS.ORG

5
Anonymous
Re: Need MySQL advice.....
  • 2007/5/15 8:35

  • Anonymous

  • Posts: 0

  • Since: 0


Thanks BS,

Looks like my hunch was right...... there's extra stuff in my dump that shouldn't be there.

My hosts upgraded the server yesterday and caused be a couple of problems, not least of which was the loss of the /cache directory

I suspect there's something wrong with the Control Panel facility that I used to backup the database and I'll take it up with them.......either that or work out how to setup and use phpmyadmin....

Thanks for your help.