Connect failed: %s | Wordpress Support | Forum Archive

The free forums are no longer in use. It remains available as read-only archive.

Avatar
Lost password?
Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
The forums are currently locked and only available for read only access
sp_Feed Topic RSSsp_TopicIcon
Connect failed: %s
May 9, 2014
12:32 pm
Avatar
Valentin
Member
Members
Forum Posts: 3
Member Since:
May 9, 2014
sp_UserOfflineSmall Offline

Hello,

   Thanks for this wonderful plug-in. Still, I have a little problem with mysqli connect.

   The host adress that is extracted from wp-config is  localhost:/tmp/mysql5.sock .  The script give me the error:

   Warning: mysqli::mysqli(): (HY000/2005): Unknown MySQL server host 'localhost:/tmp/mysql5.sock' (1)

   Connect failed: %s

I did change in the Configuration > MYSQL the Mysql hostname to "localhost", "localhost:3306", "localhost:3317" nothing seem to work.

While putting localhost only, the error change to Warning: mysqli::mysqli(): (HY000/1045): Access denied for user: 'dboXXXXXXXX@localhost' (Using password: YES).

If this helps, I did have almost the same problem with PhpMyAdmin while configuring it, I was forced to give the port to the database, is there a way to do the same with Xcloner ?

 

$cfg['Servers'][$i]['host'] = 'localhost';

$cfg['Servers'][$i]['port'] = '3306';

$cfg['Servers'][$i]['socket'] = '/tmp/mysql5.sock';$cfg['Servers'][$i]['connect_type'] = 'tcp';

$cfg['Servers'][$i]['extension'] = 'mysqli';

 

Is there a way to connect to the database using another method (not mysqli) ? If i chose not to save the DB, can I export the SQL file with another tool (like Adminer or PhpMyAdmin) and then put it in tar file ? It will work ?

Thank you.

 

May 10, 2014
5:53 am
Avatar
Ovidiu Liuta
Admin
Forum Posts: 2484
Member Since:
September 26, 2010
sp_UserOfflineSmall Offline

The mysql backup file is located in the administrator/backups/database-sql.sql file, so you can import that file through phpmyadmin.

 

Ovidiu

May 11, 2014
9:12 am
Avatar
Valentin
Member
Members
Forum Posts: 3
Member Since:
May 9, 2014
sp_UserOfflineSmall Offline

Hi Ovidiu,

  The question was in the other direction: Made the sql export from PhpMyAdmin and integrate it in .tar file manualy since the script can't connect to the database in first place. Can you alter the script to have the port feature in Configuration > MySql ? Database is the most important elemement of a backup, since the files can be exported with many utilities like the file manager from Cpanel or Net2Ftp .

   Is there a diference betwen the sql made by the script and the sql made by phpmyadmin ? (Drop, Insert Into, etc).

  Thank you, have a nice day.

May 12, 2014
6:34 am
Avatar
Ovidiu Liuta
Admin
Forum Posts: 2484
Member Since:
September 26, 2010
sp_UserOfflineSmall Offline

There is not difference between the two files, so that's not the issue. I think the issue you are having there is from the connect details, localhost is good for server name, you might need to recheck the mysql user and password.

 

Ovidiu

May 29, 2014
12:19 pm
Avatar
Valentin
Member
Members
Forum Posts: 3
Member Since:
May 9, 2014
sp_UserOfflineSmall Offline

Hi Ovidiu,

 

I still have the same problem, the details (database name,password) are correct. I have a dedicated server.

The connexion details for database extracted from WordPress config is:

 

define('DB_HOST', 'localhost:/tmp/mysql5.sock');

So I tried the adress the message is

Warning: mysqli::mysqli(): (HY000/2005): Unknown MySQL server host 'localhost:/tmp/mysql5.sock' (1) in /homepages/amber/wp-content/plugins/xcloner-backup-and-restore/common.php on line 64

Connect failed: %s
 
With "localhost" in the adress the message is:
Warning: mysqli::mysqli(): (HY000/1045): Access denied for user: '***********@localhost' (Using password: YES) in /homepages/amber/wp-content/plugins/xcloner-backup-and-restore/common.php on line 64
Where *********** is my database username (hidden).
Readind the hosting documentation, there may be a problem betwen class "mysqli" from PHP (PHP Version 5.4.28) and the Mysql version of the database  (Client API version 5.1.73). Something about password encryption maybe ? Is there any chance to make the plugin connect to database other than mysqli ? Line 56 of common.php ?
If not, please specify with options to select in phpMyAdmin (increment,drop,insert) to use on the  imanualy made database dump.
Thanks in advance.


May 30, 2014
6:51 am
Avatar
Ovidiu Liuta
Admin
Forum Posts: 2484
Member Since:
September 26, 2010
sp_UserOfflineSmall Offline

If you like, you can downgrade XCloner to a previous version, mysqli was added only recently.

Forum Timezone: America/Chicago
Most Users Ever Online: 867
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
mlguru: 30
Django29: 29
Andy: 21
D: 21
Marcus: 20
Jamie F: 19
Member Stats:
Guest Posters: 738
Members: 10030
Moderators: 2
Admins: 3
Forum Stats:
Groups: 3
Forums: 7
Topics: 2397
Posts: 8236
Newest Members:
Omar Vera
Moderators: TriP: 0, Steve Burge: 0
Administrators: Ovidiu Liuta: 2484, Victor Drover: 1, Valentin Barbu: 0