I've developed WP site locally using MAMP. I know how to transfer WP site to server using FTP but problem is how I get MySQL DB to server. Before I've done this in cPanel and that's easy. Now there's no option to use cPanel or phpMyAdmin on the host. I can get connection to server with FTP and SHH. So is it possible to move DB from MAMP to server somehow? If not what should I do?
Thanks in advance!
You could FTP the export of your SQL dump file to your live server, then if you have SSH access and can connect to the MySQL command line, you could import your SQL dump file. This article should be helpful:
https://stackoverflow.com/questions/17666249/how-do-i-import-an-sql-file-using-the-command-line-in-mysql
You didn't specify what type of live server you're running, that information would be helpful!
Related
I have tried everything
Wamp and XAMPP only provide thier own local server and wont let me specify my own server
I have tried IIS and PHP but it doesnt work at all
I would like a simple way to get my SQL server to use PHP in my domain, i dont need it to be remote access yet
Appreciate some hand holding at this point :(
Thanks
Hi thanks for replying
I have explained below what everything meant by using xammp or want iis and php
The server I have is on the Microsoft SQL server management studio
All of the all in one installers will just user local Host and thier own server and database I want to use mine.
Whenever I try using MySQL connection it says it has activley refused connection.
I've added my credentials into the security section on the server. Allowed remote login and specified ports on the server manager program.
Why isn't there a simple step by step program to enable php use on my server and or connect it to my online site..
I'm having a problem, because I have to copy a live wordpress site to my local server (xampp). But the site php version is out of date and the phpmyadmin database too, so I can not import the database. And if I upgrade the php version, the site can no longer be reached. What is a good way to copy the site to the local server.
Can somebody help me out?
You can try to dump the database with mysql command line interface using ssh from the server. Then try to import the database in local phpmyadmin with SQL compatibility mode as MYSQL40. It may work.
I have been recently using "localhost" as my mysql database, and now i want to update my website to web.
I took free hosting at "serversfree.com" and uploaded all my web files there.Now i have problem.I made mysql database on that website, and uploaded my mysql database from localhost.
I can go to that server and list all files i have in that mysql database, but when i want to connect my .php documents i don't know how.What to put under "hostname" (i was recently using only localhost).Do i need to put a link where my web mysql database is?
Or i need to put a link where my website is?
I tried both but didn't worked for me
Most web hosts I've used have MySQL running on the same box so I usually can keep localhost as the server.
Your host should have some documentation on where to point the server to.
Check if your database credentials, are from a valid user in that database..
What hostname did you use to upload your mysql database from localhost? It would be the same hostname. Probably mysql.serversfree.com. If their mysql server is on the same subdomain then you can use localhost as well. To connect your php scripts to a mysql server you need to use the hostname of the mysql server, not the hostname of your http server.
If your mysql is running in the same server then you can use localhost or 127.0.0.1 but if mysql is in another server probably you need remote connections
I am very new to this server setup and database connectivity. I googled a lot but couldn't find the solution for it.I am developing an android application which needs to post data to remote database. Which is done.
Now i have to setup MySQL Database in the new Windows Server 2008. I have installed and managed to get access the root user(Which is fine). Now i want to access this database from my local computer[Which is iMac]. I already set the privileges by following this link. When i tried to run from my web application it shows the following error.
Error: unable to connect to database. Host 'xx.xx.xxx.x' is not allowed to connect to this MySQL server
Here is my questions
1.) How to get access to the remote MySQL database from any computer?
2.) How to run the web application in the server?Like Web Hosting i.e Do i need to setup ftp account and put the stuff over there?(For Eg: testhost.com/connecttodatabase.php by executing this it will execute whatever code in testhost server. But i have no idea how to do that for my server).
Any help is much appreciated.
Alternately, You can also try...
use the_database_name;
GRANT ALL PRIVILEGES ON
the_database_name.*
TO
'the_user_in_php_code'#'%'
IDENTIFIED BY
'password_of_the_user_in_php_code';
FLUSH PRIVILEGES;
source:
http://forums.devshed.com/mysql-help-4/host-is-not-allowed-to-connect-to-this-mysql-server-366908.html
I'm trying to connect to a remote server's mysql instance from PHP on my main server.
The main server itself has no mysql installed but the server I'm trying to connect to has mysql installed.
PHP is installed on both servers but I was wondering if it would connect when mysql isn't installed locally.
You only need a client mysql library specific to your database connection stack, not a mysql server installation.
There's no reason that I can see for it not working. Keep in mind that you'll need the hostname of the server and the server will have to have remote_access configured.
All you need is to have the second server's URL and SQL info such as username and password.
no reason for it not to work.