SitePoint Sponsor

User Tag List

Results 1 to 12 of 12
  1. #1
    SitePoint Zealot
    Join Date
    Aug 2000
    Posts
    184
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have backed up my message board into a file backup.sql and am trying to recreate the database at my new host. The problem is my old host had a database called survivor and user xxxxx and pass yyyy

    My new host calls my database schat and user schat and pass yyyy

    When I try and create the tables etc with my backup I get the following error: access denied for schat@localhost etc.... Is this because the database and username is different...

    Can someone help me my message board is down at the moment and money is flying away.

    Thanks
    "Over 2200 Free Webmaster Resources and Tools"
    Search through our continually updated directory of free webmaster resources.
    WebmasterLane.com

  2. #2
    AdSpeed.com Son Nguyen's Avatar
    Join Date
    Aug 2000
    Location
    Silicon Valley
    Posts
    2,241
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could modify the backup.sql file since it's just a text file contains a bunch of queries to re-create your DB.
    The information about your DB should be on the top of backup.sql, so not very hard to find.
    - Son Nguyen
    AdSpeed.com - Ad Serving and Ad Management Made Easy

  3. #3
    SitePoint Zealot
    Join Date
    Aug 2000
    Posts
    184
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    On the top it has my database name. I have changed it from survivor to schat, but I think it still has my username webmast in there which I need to change to schat. I can't find it.
    "Over 2200 Free Webmaster Resources and Tools"
    Search through our continually updated directory of free webmaster resources.
    WebmasterLane.com

  4. #4
    AdSpeed.com Son Nguyen's Avatar
    Join Date
    Aug 2000
    Location
    Silicon Valley
    Posts
    2,241
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The dump file won't contain your username/pwd
    That's your job to put it in the command line:
    mysql -u username --password=pwd <backup.sql
    - Son Nguyen
    AdSpeed.com - Ad Serving and Ad Management Made Easy

  5. #5
    SitePoint Zealot
    Join Date
    Aug 2000
    Posts
    184
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I know how to do that, but I don't have telnet access for a couple of days, just phpadmin which you should be able to use hopefully.
    "Over 2200 Free Webmaster Resources and Tools"
    Search through our continually updated directory of free webmaster resources.
    WebmasterLane.com

  6. #6
    SitePoint Member
    Join Date
    Mar 2001
    Location
    Albany, NY
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I believe phpMyAdmin has a tool to import MySQL dumps, but if not you could just copy the contents of the .sql file and paste them in as a query.
    John Reyes
    HostRocket.com Support

  7. #7
    SitePoint Zealot
    Join Date
    Aug 2000
    Posts
    184
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have tried using the tool for importing mysql databases and also tried pasting for queries. Anything I do I get the error:
    MySQL said: Access denied for user: 'schat@localhost' to database 'schat'


    Maybe they did not give me the right permissions. I am sure this is a basic thing.
    "Over 2200 Free Webmaster Resources and Tools"
    Search through our continually updated directory of free webmaster resources.
    WebmasterLane.com

  8. #8
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    You're right, you should have access to your own database. I don't see why you'd be getting the error you're getting if your permissions are configured correctly.

    Are you able to create a simple table and insert a couple of entries using phpMyAdmin? If not, then it's definitely a permissions problem.
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  9. #9
    SitePoint Zealot
    Join Date
    Aug 2000
    Posts
    184
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well I was able to create a few basic tables using another mysql backup I had for a banner rotator, but when I go to drop the tables I get the same error:
    MySQL said: Access denied for user: 'schat@localhost' to database 'schat'

    Is this my fault or is it my host that needs to set my permissions correct. I was told that it is a brand new server and I am the first client on it. Maybe they didn't set it up correct?
    "Over 2200 Free Webmaster Resources and Tools"
    Search through our continually updated directory of free webmaster resources.
    WebmasterLane.com

  10. #10
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    It's quite possible they haven't given you DROP privileges, thinking they are preventing you from DROPing the database as a whole. Since SQL backups usually start by DROPing the tables to be restored (so they can be reCREATEd from scratch), this may be where your 'access denied' error is coming from.

    Contact your host and request that they ensure you have DROP privileges on your database.
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  11. #11
    SitePoint Zealot
    Join Date
    Aug 2000
    Posts
    184
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay thanks...this new host I have went to has been problem after problem..It took 3 days for them to give me an IP so I could upload my files before changing the dns name servers, then the mysql permission errors and now I am denied access to my CGI bin...for some reason. hmmmm sounds fishy
    "Over 2200 Free Webmaster Resources and Tools"
    Search through our continually updated directory of free webmaster resources.
    WebmasterLane.com

  12. #12
    SitePoint Wizard
    Join Date
    Apr 2000
    Posts
    1,483
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Also it is not advisable to use phpMyAdmin to import/export tables as it sometimes causes problems with templates. If at all possible use telnet.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •