MySQL 8.0 Deployment with Data Seperate - mysql

I have been running MySQL 5.X for several years. Just come to a new server and downloaded V8.0.11.0. I installed it and it asked me no questions about where to keep the data, it has put it all on the C: drive. I want to keep it separate to make backup easier. How do I make the data location move to another disk?
What I have tried:
The old 5.7 method of stopping the server, moving the files, updating
my.ini and restarting. You can't move the files (Access denied) and
the server doesn't start if you change the my.ini file.
mysqld --initialise --datadir="F:\MySQL\Data" (tried forward slashes and double slashes as well)
I can't find any documentation! It's a pretty basic requirement so I'm guessing it must be documented!

OK, I uninstalled MySQL and then ran the installer again. The first question is where do you want to put things! I take it all back, apologies for missing it!

Related

Export table from Xampp MySQL from file directory

I have an error with Xampp where it will not connect to my database. I have had this error several times in the past and no solutions have helped. I find that uninstalling and reinstalling ends up being the fastest method, however, by doing so I lose my database tables. As I have no access to the default export and import functions, I was wondering how I transfer the tables across.
Last time, I copied and pasted these files into the same directory when I reinstalled Xampp and the tables transferred but the data within did not. The tables had also lost some functionality as well.
If anyone has any methods to do this I will greatly appreciate it.
The best way to backup and restore your data is to dump the database to an SQL file. You can use the provided mysqldump tool for that, which is the best tool for the job.
Copying the entire MySQL "datadir" (which is probably one level up from the screenshot you've posted) and completely replacing one of your new stopped MySQL instance will probably work, but is not reliable and is not supported. Since there are other files (such as ibdata1) that handle the overall health and functioning of the entire MySQL instance, you can't only copy over individual database directories. Furthermore, you should only do this when the original and replacement MySQL servers/daemons/services are completely stopped because otherwise there are file corruption or concurrency issues.
Since you're running the server on your own computer, you should grant yourself sufficient access to be able to use mysqldump and use that regularly as a backup, since file-level backups of the data directory are not reliable.

Duplicate MySQL database without shell

I crashed my first Ubuntu installation by changing some distribution stuff (now stuck in login loop, even in shell).
So I installed Ubuntu again on my second hard drive from which I can access the crashed Ubuntu setup.
And since I can't start Apache2 or reach the MySQL server there anymore, I'm wondering if there is a possibility to duplicate the MySQL data just by copying files from one hard drive to another.
Or maybe someone has an alternative idea to restore the MySQL data?
You can create a database of the same name on the other computer and then transfer the content of /var/lib/mysql/_dbname_/. Stop before the copying and start after it.

MySql not working in Wamp

Last week my WAMP not working properly when I start it, it goes yellow.. and local host working fine but when I go though phpmyadmin its not working...
After that I try to go on mysql data folder in wamp and delete following files
ib_logfile0
ib_logfile1
ibdata1
And the restart all service it working and goes green but my all database not working.. daily I do that for starting the service and import all the database daily for working
please suggest me the solution of this....
if you are using the wampserver 2.5 uninstall it and
try to follow the instruction on the video (click here) better to understand and follow the instruction carefully
still got error's? I suggest use wampserver 2.2 because wampserver 2.5 has lots of bugs and errors
HOPE it helps you.
You deleted the files that MySQL uses to store the database -- of course your databases aren't going to work. I suggest you restore your databases from a backup. There's no way around it; as long as you are deleting the database files, you're going to have trouble using the database.
About the problems logging in through phpMyAdmin, you can search here for the actual error message or open another question and perhaps get that problem resolved as well.

Move native phpmyadmin databases to xampp

After a computer crash (Mac OSX Update), I was able to recover my files from a back up. In order to make things easier on me in the future, I decided to move to XAMPP instead of using the native PHPMyAdmin and MySQL. I know where PHPMyAdmin was pointing before - how do I move the files so XAMPP can see them?
It's not a recommended means of backing up and restoring, but as long as there's nothing in the XAMPP databases you might just be able to replace the XAMPP data directory with the backup from your old MySQL one. Note that XAMPP may have "important stuff" in the database by default; I don't use it so I have no idea. You can also just drop in specific databases (which are represented on disk by files or folders of similar name), but will have to recreate permissions and users for those.
It's better to do SQL exports and imports for backing up your data.

mysql - how do I load data from a different configuration

I'm not sure if this will make sense, but I'll give it a shot.
My hard drive went down and I had to reinstall the os along with all my webserver configuration,etc. I kept a backup of the mysql database, but it doesn't contain all the tables...I added a couple tables after my last backup.
I have access to the hard drive and the directory where the mysql data files are stored from the failed hard drive, but I don't know how to retrieve the data into my new mysql database. Is it even possible to get the raw data files from mysql and load them into a different instance? I'd even be happy if there was some way for phpmyadmin to show the data files, then I could dump out to a backup txt file, and reload them into my new configuration.
Any help will be appreciated. thanks.
well, bad news...I can't access the drive anymore. As I tried to copy the files the drive went totally down. So, I'll just redo the couple tables. Thanks for your help anyway.
Although not recommended or reliable, it is possible to simply copy the data without using mysqldump. It might help if MySQL was shut down in a controlled manner (which does not appear to be the case) and the source and target environments are as similar as possible in terms of lib and MySQL versions.
The datafiles should be compatible - you can copy the data directory to ubuntu, and edit the /etc/mysql/my.cnf to point to the new directory.
The only catch might be where ubuntu being case sensitive effects the tables.