The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Database Transfering

Discussion in 'Database Discussions' started by Kai0007, Nov 24, 2015.

  1. Kai0007

    Kai0007 Registered

    Joined:
    Nov 23, 2015
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Germany1
    cPanel Access Level:
    Root Administrator
    Hi,

    can anyone here help me with database transfer from a shared hosting to a dedicated server, cPanel are on both servers, I have exporter and imported the database but said connect failed, then I have removed the encryption of the database password, then connect was succed im frontend, but when I try to go to the admin backend, said: acces denied?!

    How should I transfer the database, what things must I take care of it, what things must I change.. Any Help

    Thanks
     
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,146
    Likes Received:
    34
    Trophy Points:
    48
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hello :),

    Are you getting any other error in your Apache server logs file with "Acces Denied" message ?
     
  3. Kai0007

    Kai0007 Registered

    Joined:
    Nov 23, 2015
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Germany1
    cPanel Access Level:
    Root Administrator
    Hi,

    Here are the errors, what I get in browser

    Code:
    arning: mysql_pconnect(): Access denied for user 'service4_all'@'localhost' (using password: YES) in /home/service4/public_html/.htinc/_mysql.inc on line 79
    Database error: Link-ID == false, connect failedAccess denied for user 'service4_all'@'localhost' (using password: YES)
    MySQL Error: 0 ()
    
    Host : localhost
    Database : service4_all
    User : service4_all
    Session halted.
    
    and here the function in the file mysql.inc from line 43 to 89

    Code:
    function check_logon() {
    
         $all_okay=false;
    
         $error_msg="All is okay";
    
         if ( 0 == $this->Link_ID ) { $this->Link_ID=mysql_pconnect($this->Host, $this->User, $this->Password); }
    
    
    
         if (!$this->Link_ID) {
    
           $error_msg = "Link-ID == false, connect failed";
    
         } else if (!mySQL_query(sprintf("use %s",$this->Database),$this->Link_ID)) {
    
           $error_msg = "cannot use database ".$this->Database;
    
         } else if (!mySQL_query(sprintf("select TableName from %s",$this->DDtable),$this->Link_ID)) {
    
           $error_msg = "no datadictionary tables in ".$this->Database;
    
         } else if (!mySQL_query(sprintf("select TableName from %s",$this->DDfield),$this->Link_ID)) {
    
           $error_msg = "no datadictionary fields in ".$this->Database;
    
         } else {
    
           $all_okay=true;
    
         }
    
        
    
         if (!$all_okay) {
    
           $this->Errno = mysql_errno();
    
           $this->Error = mysql_error();
    
           $this->warn_not_loggedon($error_msg);
    
         }
    
         return $all_okay;
    
       }
    
    
    What I wish to know also is: How should I transfer the database, what things must I take care of it, what things must I change.. I thought with export and import things will done well, but I thing that is not enough, what should I do to be 100% right.

    Thanks
     
    #3 Kai0007, Nov 24, 2015
    Last edited by a moderator: Nov 24, 2015
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  5. Kai0007

    Kai0007 Registered

    Joined:
    Nov 23, 2015
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Germany1
    cPanel Access Level:
    Root Administrator
    Yes.

    ((( I wish to ask if I can open a Support Ticket in my WHM, I have a License, can I open a Support Ticket for Free, OR it will cost something when I open a ticket, I treid but I have so a long text file what I must agree, then I have canceled that, because I thought maybe it will cost also, I thought when I have a WHM licens for a dedicated server I got support for Free, Please let mo know about it, Thanks)))

    I tried with Backup and restore, and import, export with database, etc. but I still got a database error, I have create the same database name and user name in the new server like the old server, and import it there, but still have a problem, must I have the same password in the old database also?! I dont know it, and at this time I dont wish to contact the developer etc. to know the password for the user in database, However I thought, I dont need it Urgent to transfer a database?

    I will be greatfull for any help, and for an answer about the support tickets,

    Thanks
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    The database password associated with the database username is not required to transfer the database itself. To answer your other question, no, there's no cost to open a support ticket. Ensure you post the ticket number here should you decide to open a ticket so we can update this thread with the outcome.

    Thank you.
     
  7. Kai0007

    Kai0007 Registered

    Joined:
    Nov 23, 2015
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Germany1
    cPanel Access Level:
    Root Administrator
    Hello,

    for this thread I will not open a ticket, it's enough in the forum, but its good to know for later issue, and I am happy for this Information, Thanks.

    about the problem itself, after transferring the database, dosnot work as it should, what should do to work ordinary, in the new server I have made the same name for database name and user for that database as it in the old server, is that not enough..

    I thought about to change the password for the user in old database, and then transfering that with the new password, and give the same password in the new server, but it seems also not working?!


    Thanks
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Try updating the configuration file for the script to ensure the database password matches the password created for the database user in cPanel. Also, ensure the database user is added to the database via the "MySQL Databases" option in cPanel.

    Thank you.
     
Loading...

Share This Page