Whenever I use:
cat /etc/my.cnf
it looks like this:
As you can see it comes out blank. On top of this I tried to reset my password and I went and screwed everything up. NOW I Just want to restart from scratch. I don't need to save anything I have no database info that I am worried about losing I am just trying to get mySQL working.
TL;DR:
I just want to reset everything/delete all things to do with mySQL to get a fresh start. I have tried all of the rm commands and reinstalling it but that didn't even work. I don't have anything that I need to save or back up.
If you installed it from the MySQL Community Server everything should be in something like /usr/local/mysql-5.7.13-osx10.10-x86_64/. The exact directory name depends on your version of MySQL and OS X.
Delete that directory and reinstall the package. That should reset everything.
Alternatively you have multiple copies of MySQL installed and they're confusing each other. Check with which mysqladmin. If it points to somewhere other than inside /usr/local/mysql-5.7.13-osx10.10-x86_64/ then you have another version installed.
Related
I'm trying to get MySQL up and running for some analysis on my Mac.
MySQL version: 8.0.19
MacOS version: 10.14.6
The timeline is:
I installed MySQL successfully from https://dev.mysql.com/downloads/mysql/
It worked fine, I was able to create simple tables, etc. But when I tried to create my real schema, I realized that the default record size of 8k bytes wasn't enough; I had to increase it to the maximum, 65k bytes https://dev.mysql.com/doc/refman/8.0/en/column-count-limit.html#row-size-limits.
After reading the documentation, I learned that the row size can only be set when the database is initialized for the first time. So I wanted to start fresh, ensuring that when I first initialized the DB, the appropriate parameters were set.
So, I uninstalled MySQL using the widget in my Mac's Command Center. I rebooted, ensured no MySQL processes were running, then ran find -iname 'mysql' 2>/dev/null in the terminal, and found nothing. All traces, so far as I can tell, of MySQL were gone.
I downloaded the macOS 10.15 (x86, 64-bit), DMG Archive package again from https://dev.mysql.com/downloads/mysql/, installed it, used all the default settings in the installer, and then opened the MySQL widget from the Command Center again.
Here's where I configured the parameters. There's a place where I can put in a configuration file. So, following the advice in this How to workaround the row size limit of 66 KBytes, I created mysql.cnf in my home directory, put only these three lines in it, and put the filename in the box (checking the tickbox next to it):
innodb_page_size=64k
innodb_log_buffer_size=32M
innodb_buffer_pool_size=512M
I hit "apply". Then I went back to the other tab, hit "initialize database". No errors, seemed to work fine. Then I hit "start MySQL". The lights went briefly green, then red again. Multiple attempts, reboots, etc, don't seem to have any effect. In short, MySQL was trying to start up, but failing.
I also tried removing the mysql.cnf file, hitting "apply" and "initialize" again, and the problem is the same. I don't understand why this all worked before I uninstalled, but won't now.
I checked /var/log/system.log, and all I see is a bunch of lines noting the failure of MySQL to start:
but nowhere is the error from the application itself shown.
I did some Googling and SO'ing and looked in /usr/local/mysql/data/ as root, and I can see files that are in binary. But i do not know how to read these binary logs.
My questions:
How can I tell what error is preventing MySQL from starting?
How can I diagnose this issue? Is there a tool to read these binary files?
Does anyone know why MySQL would fail to start after a full wipe and re-install, though it was working in the first instance?
I experienced MySQL's failing to start from the System Preferences on Mac. It would turn green and red again. I also wiped and reinstalled a few times and it still wouldn't start.
In my case, I realized it was because I had AMPPS stack installed and its MySQL running at the same time. After turning off the MySQL in the AMPPS stack, I was able to start MySQL from the System Preferences successfully. Not sure if you had another software stack running that would cause the problem.
I use MySQL 5.6 on a Windows 7 Laptop. I restarted my laptop, came back on and for some reason it wasn't started. So I went to command prompt and restarted it (as it's not a service) only to find out my MySQL user got deleted?
Basically it's like my old MySQL user is just gone, 1. All my databases are gone which is weeks of work (as well as my database backups) 2. My root user doesn't have a password anymore?
Anyone know what's going on? Can I get my databases back? It wasn't a version upgrade or a laptop upgrade. I simply restarted my laptop as it was lagging a bit.
Anyone any ideas? Cheers.
Referred to your comments:
Yes you have the folder but it is hidden.
Type win+R or click run from start menu. And type : c:\programdata\ type enter and open mysql\data folder.
Probably you will find your data in this path.
EDIT :
Copy the Data folder safe place first. And then remove all mysql and all related files. Perform clean install. And replace your existing data folder to new one. That's all.
I'm trying to get Drupal 7.28 installed on Ubuntu and have run into this very common but not so easily fixed issue of the WSOD during configuration due to the database not being properly set up on an earlier step (only 31 tables created). https://www.drupal.org/node/481758
Many people have fixed this issue by dropping the database and recreating it, which I've tried, but when I try to run /install.php again it insists that it is already installed and I must empty the database if I want to reinstall.
So I tried deleting the database and NOT recreating it but the installer still says it is already installed and I have to empty the database WHICH DOES NOT EXIST if I want to reinstall.
What do I need to do to get the install script to run again?
Ahh. I needed to go back to the default settings.php for the site, then it worked.
in /var/www/drupal/sites/mysite.com
mv settings.php old_settings.php
cp default.settings.php settings.php
Now going to mysite.com/install.php starts over at the beginning of the install.
I've been stupid enough to delete too many databases in XAMPP with PHPMyAdmin and now my sites on localhost don't run properly anymore. Please see this screenshot of the main errors
I guess entirely reinstalling XAMPP will fix the problem but that might take much more time than necessary. Preferably, I'd like to just reinstall the MySQL component or perhaps recreate/repair some databases required for XAMPP to function properly. However, it looks as if I can only reinstall XAMPP entirely instead of separate components (and if that's correct, it's probably for a reason...).
Do I have a better option here than a complete reinstall of XAMPP?
OK, fixed it with the kind help of scones.
1) By default (XAMPP 1.8.1 on Windows XP), there seems to be a folder C:\xampp\mysql\backup\phpmyadmin. Just copy-paste this entire folder into C:\xampp\mysql\data.
2) Stop and restart MySQL
3) If you're using WordPress, your pages may be blank since it may think there are no themes available. Go to [frontpage url]/wp-admin/. Now just reactivate the theme you'd like to use and all seems up and running again!
You dropped the database for PHPMyAdmin. If you can just restore that (with a command line mysql tool or any tool that does not rely on a web-interface), you can use phpmyadmin again.
I am a a newbie to database programming and I want to try out MySQL.
I just installed MySQL from the official website, I am running mac 10.8.2.
Anyways, whenever I try to run a simple command like $>mysql.server start
it says Permission denied.
I am able to open it through sudo but I would love to get this fixed as this is annoying me, that it wont work properly. I have been searching for the last two hours without finding a fix, so I was hoping anyone could give me a helping hand.
The easiest way is to install the MySQL Startup Item. Then you get a Preference pane for MySQL.
See http://dev.mysql.com/doc/refman/5.5/en/macosx-installation-startupitem.html for full instructions.
Re your comment:
It's often required for services like mysql.server need to run as a uid other than your user login. For instance, the MySQL data directory may only be writeable by the mysql uid. So starting such a service must be done from a user that can change the uid of the process. The root uid can do that, so it's necessary to use sudo to launch service processes like mysql.server.
TL;DR: YOU HAVE TO USE SUDO.
If you a absolute newbie to MYSQL and you just want to use the MYSQL server to test your code on you local MAC I would advice you to take a look at XAMPP / MAMP. Xampp offers a complete out of the box install for everything you need for a development servers (Apache server, MySQL, PHP, etc). Note, that I XAMPP / MAMP is not suitable for production server setting.
I personally use the XAMPP Windows version. I haven't tried MAMP but I have come across it many times . The XAMPP for Mac version seem not to have been update for a while so I suggest you give MAMP a try.
You could of course try to get your current install to work but that might require some work. Also with regard to firewall / security issues. With the out of the box version you will have to do a lot less. Why reinvent the wheel if you can easily install a out of the box version.