I just started with drupal 7. After installation process, I want to include another database (new database has the same name, and it was used on another drupal project). Together with the database I have replaced sites folder.
The problem is, after I import a new database, on refresh I am redirected to install drupal. When I type database info I get error:
Failed to connect to your database server. The server reports the following message: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2).
Any help is appreciated!
Denis
If you database server is on the same machine as the web server, and you were using localhost as the address, try using 127.0.0.1 instead.
Related
Hi I am trying to setup Owncloud with an external MySQL DB.
In MySQL server - I have changed bind-address= 0.0.0.0 , created a user and granted , flushed privileges.
Now i am able to connect to MySQL from CMD in Owncloud server.
When I try to setup getting an error
" Error while trying to create admin user: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [1044] Access denied for user ‘oc_root2’#’%’ to database ‘owncloud’ "
Can some one please help.
You should consider using Nextcloud. This is more actively maintained, fully open source and has more features. Setting up Nextcloud via the command line works fine for me. I suggest that you use the setup-nextcloud.php script and everything should be automatic.
Windows Server 2008
Tableau Desktop 7.0
Local MySQL database using Xampp
When attempting to connect to a localhost MySQL database server using the native MySQL data connection in Tableau Desktop, I'm getting the following error:
"The connection to the data source might have been lost.
Communication with the Tableau Protocol Server process was lost.
Unable to connect to the server "localhost". Check that the server is running and that you have access privileges to the requested database.
Unable to connect to the server. Check that the server is running and that you have access privileges to the requested database."
When using "Other Databases (ODBC)" in Tableau, I am able to connect and return data. However, I would prefer to use the MySQL connection to avoid the limitations of the Other Databases connection.
I created a specific username in phpmyadmin as well as tried using the root username and password and the same error was returned. I created a user DSN in odbcad32.exe and attempted using multiple versions of the MySQL ODBC driver (3.5, 5.2.7, 5.3.4).
Does anyone have any ideas of what might be causing the error? Really appreciate any help.
A bit late in replying but....
MySQL user connections are based on a combination of username,password AND the host you are connecting from.
If you are connecting to MySQL on the same host as Tableau server, then the connecting host could be seen as '127.0.0.1', 'localhost', '::1' or even a hostname if MySQL is configured to resolve those.
The simple way to test would be to set the host field to '%' for the user you are trying to connect as. I would not recommend this for your root user entry or other accounts with significant privileges.
I have a db hosted at Godaddy.
I've made a backup of my MySQL 5.0 database.
I deleted the db.
I've made a new db which uses MySQL 5.5
with the same password as used before.
Now I can't connect, and am getting this error message:
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
In Godaddy's database details menu the hostname is incorrect. I had to get into phpmyadmin and copy the IP address shown there. Using that when connecting via PHP makes everything okay.
I am trying to connect Coldfusion 9 to a MYSQL Database that was installed by MAMP (free not Pro) with the following parameters:
CF Data Source Name: MyDatasource
Database: MyDatabase
Server: localhost
Port: 8889
Username: root
Password: root
In the coldfusion Administrator I can successfully connect to this database. However, when I try to display a .cfm page that has a connection to that datasource, this error is thrown:
Error Executing Database Query.
Could not create connection to database server. Attempted reconnect 3 times. Giving up.
Any ideas??
Any help would be immensely appreciated!!
edit
this is what MAMP wants me to use and it did create a successful connection in CF Admin.
In the CF admin, if you click "Verify" it shows a successful connection? Usually MySQL databases are on port 3306 not 8889. Are you sure you have the correct settings?
So, after searching and trying to figure out what is going on, I decided to check my Application.cfm file, and sure enough, I have global connection strings for all of my queries. One of those strings was the DB password, which was not set to "root".. Thank you for your help and I apologize for the stupid question..
I have a MySQL database I'm able to connect via the command prompt and the MySQL administration tool but using the same credentials in a Web application in a Tomcat server on the same server gives me this error:
javax.servlet.ServletException: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)
Which I recognize as an incorrect credentials issue. I checked that the MySQL server is listening on port 3306 using netstat. I don't have the mysql root credentials but I created a new account and granted all priviledges to it and are the ones used to connect both using the command prompt and the MySQL admin tool.
Turned out to be a caching issue. Disabled the context caching in the web application in order to "see" the changes. Windows doesn't show this behavior/issue.