Moving databases from XAMPP to a standalone MySQL 8 server - php

before I used xampp to start mysql server but recently I installed mysql server 8 and I need to transfer old databases that are in data folder in xampp to data folder that is in mysql server 8 but when I did that I get error when I try to restart mysql service. Can somebody explain to me how should I go about this?
I tried to change all files that is inside of mySql server 8 Data folder but it doesn't work, I still get the same issue.

Xampp is based on mariadb and its version is relatively low, so there will be problems directly by copying the directory. It is recommended to export and import through mysqldump.In addition, it is necessary to ensure that they use different ports, otherwise there will be port conflicts and the database will not start.

Related

How to safely uninstall a dual mysql installation on ubuntu?

So I installed mysql server through the command line on ubuntu. But a few days later I installed xampp which includes mysql aswell. I had some problems accessing mysql and phpmyadmin. Turns out the problem was that the previous mysql I had installed would start up and occupy the port that the xampp mysql was trying to access. After killing the process and relaunching xampp I had no more problems. The thing is I would like to uninstall the previous mysql server I installed and only work with the one xampp provides, specially to avoid this from happening again after I restart my PC. Is it safe to uninstall and purge it from the command line? Will the uninstall affect in any way the mysql of xampp? And how can I tell between the two?
I do notice that there is a mysql folder at /etc/mysql with its config file my.cnf. And then there is another mysql folder at /opt/lampp/mysql with only a readme.txt and a folder called scripts which contains a ctl.sh file. But under /opt/lampp/etc I can also find a different my.cnf file. Should I assume that an uninstall or purge command from the terminal will leave the mysql I use of xampp intact? Is it safe to follow any uninstall tutorial?
And finally, if someone can explain this to me I would like to know. Why did this problem arise after I turned off my computer and booted it up again? I was working with xampp and able to access phpmyadmin without any problems. So, how come that when I started the computer today, xampp was unable to launch mysql because the previous mysql was an active process? Does mysql launches itself automatically on boot? Any answer will be deeply appreciated, thank you.

How to setup a PHP server?

I'm trying to set up a PHP server. We have an old server that runs a bunch of in house forms over an intranet that is coded in ASP, and I'm trying to rebuild that into a better system using PHP.
I'm starting fresh, as have been given a Win 2012 r2 server.
I first tried installing IIS 8. I installed downloaded the files for php (version 7). I was successful in being able to access index.html and any other files placed in the c/inetpub/wwwroot folder from a different PC via a browser (http://servername/file.php). However, I installed MariaDB and phpmyadmin. phpmyadmin gave the the message the mysqli extension is missing.
I ultimately uninstalled IIS, and PHP, and the MariaDB. I wanted to start from scratch, and tried with Apache
I was able to get Apache and PHP to work together, but I could not access files in the htdocs folder from a different PC (going to http://<servername>/file.php). I could only access it via localhost.
I had the same problems with phpmyadmin and mysqli.
I also noticed there was no php.ini file... rather I saw a php-ini-production and php-ini-development files.
How to I fix the phpmyadmin problem? Any advice for configuring apache so that I can access files place in the htdocs folder from a device other than the server itself (non-localhost)?
I recommend using XAMPP, then you'll have MySQL, and may be you could configure to use MariaDB as well.
If you use XAMPP, phpmyadmin is not available other than localhost, but that is configurable. If you want i can help you find a good video for that.
take the php-ini-production file and rename it to php.ini and find the line
;extension=php_mysqli.dll
and just remove the leading semicolon (;), save and restart apache.
Also you need to open the firewall on your machine to allow port 80 to accept all connections.

How to run Glassfish server with wamp?

I am running a NetBeans project on my Windows machine with Glassfish server with MySQL server 5.6. Now I installed wamp 3.1.3 (64bit), but MySQL service is not starting in wamp. I know it is because MySQL is already running on port 3306. I have tried to change port number for MySQL of wamp in my.ini and php.ini files, but this doesn't work for me.
I have tried so many ways to solve this but didn't succeed. Kindly guide me to solve this issue.
I have found a simple solution of my problem. The sequences of the steps has given below.
Backup your data from C:\MySQL\MySQL Server 5.6\data or export your database by using MySQL Workbench
Remove already installed MySQL Server, using MySQL community installer
Now restart wampmanager.exe
import your data into MySQL database
Cheers. It will work smoothly.

cannot run the localhost with upgraded php version and mysql version

My localhost was running on wampserver 2.0 ( with php5.3.0 , mysql5.1.16 , Apache 2.2.11). I needed to upgrade php and mysql, so i downloaded php 5.6.16. and extracted in to directory "wamp/bin/php/php5.6.16" with 3 mandatory files ( php configuration file, phpForApache configuration file and wampserver.conf file) from existing php5.3.0 folder.
Then I got a mysql from my friend's (mysql5.6.12 64bit) wamp directory. didn't do any configurartion. I put it into my wamp/bin/mysql. then i exited from wamp and restart it again.
Then php and mysql versions look like this.
mysql version is not displayed here. and the existing version name is not selected. with these changes I executed the localhost on browser.
wamp server home page is displayed on the browser.
Then I could see this.
In above image, the updated Mysql version is displayed, but not displayed in wamp tray menu mentioned before.
After I tried to view phpmyadmin page. the page was not loaded.
When I'm trying to select mysql version5.1.36 from wamp tray menu, following error was occurred.
Special: after this error occurred, the wamp go offline and cannot open localhost.
And also when I select php version 5.6.16 from wamp tray menu and start localhost, but it goes for " unable to connect" page.
Then I removed the new mysql 5.6.12 folder from the wamp/bin/mysql directory. then restart services and try again.
Nothing changes happened. when start the localhost I could see mysql version again as before.(MySQL Version :
5.6.12 ). But I already removed it from the directory.
I explained everything that i faced.
I need to know what is going on here and how to fix these problems. and How do I install php and mysql versions in this wampserver 2.0.
A working WAMP install should come with included MySQL and PHP versions. That's the whole point of using a package such as WAMP instead of installing your own; you get a whole working stack with one installation instead of having to install each application individually and then configure them manually to work together. Therefore, I have no idea why you would want to copy a friend's MySQL application to your computer. Aside from the fact that you probably didn't copy all the system files (DLLs, library files, etc), you're probably introducing conflicts with the library files that PHP and WAMP use to access MySQL since it's expecting a particular version and now you're providing a different version.
Frankly, at this point it sounds like things are messed up enough that probably the only proper solution is to remove what you have and reinstall the WAMP package (or each individual component). Make sure you back up any relevant changes you've made (configuration, web files, and databases) first!
First of all take back up of all local website in WWW directory found in wamp folder.. This is a time consuming time as it has to back up and copy all files, so sit aside and be patient.
Now, the only solution for this error is to uninstall wamp from control panel and than get tne new version of wamp according to your needs wither from archive or directly the latest version with your preferred php, mysql and apache versions. Follow this steps for backing up and recovering your old projects.:-
Before uninstalling the crashed server copy the full folder as backup of all previous data. (Example: Take backup of "C:\wamp" folder)
Uninstall the Crashed server and install the new one.
Make sure your new server running and has no error.
If server is running make it Stop and Offline then close it.
Go to C:\wamp\bin\mysql\mysql5.0.45\data\
Its better to take a backup copy of this data folder.
Replace the files and folders with your previous server data.
Add your Previous Projects to the Root folder. (Example: "C:\wamp\www")
Restart the server and check whether your previous tables and data are reflecting in the new server. (Example: Check it Out here http://localhost/phpmyadmin/)
Enjoy with your Old Projects at new server.
Source:- mysql.com
From:- http://infinium-tech.com

Setting Up PHP and MySQL Development Environment

I'm building a website with PHP and using MySQL as the database, so I need help setting up the development environment. I want to execute and test the PHP scripts locally, with all the local database connections and all the operations possible on database by PHP scripts.
I'm on Windows and I've installed MySQL and Eclipse IDE for PHP, so how do I connect these two applications, so that the scripts related to database can directly execute queries on this MySQL installation? Also the Eclipse IDE isn't able to execute the scripts on localhost, it returns this error "The webpage cannot be found".
So how can this be solved and connections be made to MySQL?
Are you able to connect your website to the database? What server are you using? WAMP or XAMPP? You need to first install the server. You can install wamp from here http://www.wampserver.com/en/.
This would be your starting point.

Categories