I have a web server set up on machine TXAP1. My mysql server is set up on another machine called TXDATA.
I also have a test mysql server on TXAP1. I am going to use it to upgrade the version of mysql to test the upgrade process.
Will upgrading the version of mysql on TXAP1 affect the ability to connect to the mysql server on TXDATA?
OS: SUSE Linux Enterprise Server 11
Apache: 2.2.10
PHP: 5.2.6
MySQL: 5.0.67
Will upgrading the version of mysql on TXAP1 affect the ability to connect to the mysql server on TXDATA?
Well, no. Connection to the TXDATA MySQL server will never be affected. However, you won't be able to use new mysql functions on the TXDATA for obvious reasons
Related
A little background: I had to upgrade a service from PHP 5.6 to PHP 7.4. Database module was using old mysql_* functions, so the the first step was to replace them by mysqli_* and look for possible bugs, at the end it worked fine on local development environment.
As there weren't any visible bugs while testing phase, it was released to a test server. Then it started randomly an intermittently to log the following warning:
(HY000/2003): Can't connect to MySQL server on 'XXX.XXX.XXX.XXX' (60)
If you check database server at that moment it replies OK, it is not down. Also there are other 3 servers online hosting the same service and they don't show the described problem meaning database server is online and running.
Also does the 60 surrounded by parentheses means something? I know it corresponds to MySQL's Global Error Message but error number 60 (EE_SSL_ERROR) wasn't added until version 8.0.13. Could it means the same in MySQL 5.6?
After some digins and tests we (team) finally discovered it was related to client library connecting to older server.
I know that there is some discussion on PHP & SQL Server, but most of this is a few years old, and predates PHP; not much mentions PDO either.
I have a client who wants to access their SQL Server database from their web server. The Web Server is Apache running on Ubuntu Linux, while the SQL Server is running on a separate Windows box.
Most of what I have been able to find is dated, especially since PHP 7 came out.
What do I need to install to get PHP & PDO connecting to to a remote SQL Server?
I am new to working with servers, and am not able to use SQLYog because it is not able to connect to any server. When I try to use the default values to connect to MySQL (localhost, root, port 3306), I get "Error No. 2003: Can't connect to MySQL server on 'localhost' (0).
Is there something I am missing or that I have to correct? I am just trying to create a database.
SQLyog is just one way to connect to a MySQL database and interact with it. Other popular methods include MySQL Workbench, Navicat, phpMyAdmin, and others.
Before you can use any of these, you have to first make sure your MySQL server is running and accepting connections. You didn't mention (or tag) whether you are running MySQL on your local machine, or what operating system you are using.
A couple of the most common development environments are LAMP or WAMP, for "Linux, Apache, MySQL, php" or "Windows, Apache, MySQL, php" respectively. Since you tagged your question php, I'll assume one of these is appropriate. (For example you're using SQLyog on Windows but your MySQL server is on Linux.) (I'll presume Ubuntu for Linux examples.)
On the machine you've installed MySQL (along with any other components), you should be able to determine its running state by looking at your process list (ps aux in Ubuntu, tasklist or Task Manager (GUI) in Windows).
You're looking for mysqld (Linux) or mysqld.exe (Windows). If the process isn't running, you need to start it (Linux/Windows). If you're using WampServer (a popular Windows all-in-one package), for example, you can also look in your Windows Services for "wampmysqld" or "wampmysqld64" and start the service there.
If you can't get the process to start, you may have a configuration error. If the process is running, you may need to check the configuration any way to determine what port it is running on, if it's not the standard 3306.
The configuration file name and location can vary by system and package, but generally it will be called "my.cnf" (Linux) or "my.ini" (Windows). Check your documentation for help on the specific path.
Once you've got the service running, you should be able to connect!
This is the default SQLyog connection dialog (at least in my slightly older version). The defaults assume you are running your MySQL server on your local machine (localhost), that you have a user "root" with no password, and the default port 3306 is used.
You'll need to change any of this information that differs on your particular installation.
Be aware that if you're trying to connect to an instance of MySQL on another machine, a firewall may be blocking a port.
These steps should hopefully get you on the right track.
Quick question: I am having issues while trying to connect to a mssql 2008 server through php. The php script is located on a different server. Does the mssql server have to have php installed on it? or only the server which I am running the script from?
Only the server you are running PHP on. If there's a connection error, you may be having issues with you connection string or with the raw networking (for instance, the port you are trying to connect to is blocked on the remote server).
If you take a look at the documentation for mssql in PHP, you can see that it accepts both local and external addresses (computer or server, port).
The server running mssql, to which you're connecting, doesn't need PHP enabled.
While I've been working with MySQL for years, this is the first time I've run across this very newbie-esq issue. Due to a client demand, I must host their website files (PHP) on a IIS server that is not running MySQL (instead, they are running MSSQL). However, I have developed the site using a MySQL database which is located on an external host (Rackspace Cloud). Obviously, my mysql_connect function is now bombing because MySQL is not running on localhost.
Question: Is it even possible to hit an external MySQL database if localhost is not running MySQL?
Apologies for the rookie question, and many thanks in advance.
* To clarify, I know how to connect to a remote MySQL server, but it is the fact that my IIS web server is not running ANY form of MySQL (neither server nor client) that is giving me trouble. Put another way, phpinfo() does not return anything about MySQL. *
Yes, you can use a MySQL database that's not on the same machine as Apache+PHP.
Basically, you'll connect from PHP to MySQL via a network connection -- TCP-based, I suppose ; which means :
MySQL must be configured to listen to, and accept connections on the network interface
Which means configuring MySQL to do that
And given the required privileges to your MySQL user, so he can connect from a remote server
And PHP must be able to connect to the server hosting MySQL.
Note, though, that habing MySQL on a server that's far away might not be great for performances : each SQL query will have to go through the network, and this could take some time...
If phpinfo is not returning anything about MySQL you need to install the MySQL plugin for PHP, easiest way to do that probably is to just upgrade PHP to the latest version. If not there is a .DLL file that you will need.
http://www.php.net/manual/en/mysql.installation.php
you will need to install the mysql extensions. this link should help: http://php.net/manual/en/install.windows.extensions.php
The MySQL server has nothing to do with PHP itself. What "mysql support" in PHP means is that it's been compiled with (or has a module loaded) that implements the MySQL client interface. For windows, it'd be 'mysql.dll', and on Unix-ish systems it'd be 'mysql.so'. Once those are loaded, then the various MySQL intefaces (mysql_xxx(), mysqli_xxx(), PDO, MDB2, etc...) will be able to access any MySQL server anywhere, as long as you have the proper connection string.