Cannot run MySQL after unzipping from a tar archive - mysql

After downloading mysql tar file archive, unzipped it in a directory (no installation).
Now when i run this from command-line:
/somedir/mysql-5x/bin/mysqld
I see following errors:
[Note] ./mysqld (mysqld 5.6.25) starting as process 5310 ...
[ERROR] Can't find messagefile '/usr/local/mysql/share/errmsg.sys'
[Warning] Can't create test file /usr/local/mysql/data/me-MacBook-[Warning] Can't create test file /usr/local/mysql/data/me-MacBook-Pro.lower-test
./mysqld: Can't change dir to '/usr/local/mysql/data/' (Errcode: 2 - No such file or directory)
[ERROR] Aborting
[Note] Binlog end
This is a mac machine, i have tried via sudo command as well - but that does not help.

Try passing parameter -b or --basedir= for specifying the path to your installation directory. E.g.:
/somedir/mysql-5x/bin/mysqld --basedir=/somedir/mysql-5x/

You need to install mysql to run it properly. When mysql start running it reads various configuration parameters from configuration files which normally is my.cnf. Among those parameters there is one which tells mysql where is the data directory. Data directory contains schema, tables etc which are needed by mysql to get started.
It looks like for your version of mysql default data directory is /usr/local/mysql/data/. Since mysql is not installed it will not find data directory there. Also i only mention one parameter i.e. data directory. There are various others which are required.
I suggest you to install mysql and then use it.

While scai answer would get you passed your initial issue. You will undoubtedly run into more issues. You cannot run mysql properly the way you are trying to. You will run into errors and mysql will crash. You have to initialize Mysql first.
sudo mysql_install_db –user=mysql
There are several internal mysql databases that mysql uses called:
performance_schema,information_schema,mysql
Without these databases and the metadata files (such as ibdata1 file) your mysql server will not function properly. Hence, the reason why you are now getting the error: Table mysql.user doesn't exist
These resources might help you in your current Mac environment:
http://akrabat.com/setting-up-php-mysql-on-os-x-yosemite/
http://dev.mysql.com/downloads/mysql/

I have faced the same issue with installation of mysql 5.7.11.
The issue got solved after setting the /etc/my.cnf as mentioned below :
basedir=<somedir>/mysql
datadir=<somedir>/mysql/data

Related

Error installing mysql

Beginning configuration step: Initializing Database
Attempting to run MySQL Server with --initialize-insecure option...
Starting process for MySQL Server 8.0.11...
Starting process with command: C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe --defaults-file="C:\ProgramData\MySQL\MySQL Server 8.0\my.ini" --console --initialize-insecure=on...
2018-06-26T08:44:42.036600Z 0 [ERROR] [MY-011071] [Server] Unknown suffix '.' used for variable 'lower_case_table_names' (value '0.0')
2018-06-26T08:44:42.036600Z 0 [ERROR] [MY-011071] [Server] C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe: Error while setting value '0.0' to 'lower_case_table_names'
2018-06-26T08:44:42.036600Z 0 [ERROR] [MY-010119] [Server] Aborting
2018-06-26T08:44:42.036600Z 0 [Note] [MY-010120] [Server] Binlog end
Process for mysqld, with ID 3232, was run successfully and exited with code 1.
Failed to start process for MySQL Server 8.0.11.
Database initialization failed.
Ended configuration step: Initializing Database
I am having this error in log during the installing of MySQL on the application configuration part.
Resolved following these steps:
- Rollback installation until initial page and choose remove mysql server
- Uninstall from add/remove programs mysql community installer
- reboot
- install version mysql-installer-web-community-5.7.22.1 and select update when it asks.
- done
This is a Bug in the Installer of 8.0.11.
There are changes in the lower_case_table_names variable in the new release. See:
https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-11.html
Nobody can fix this. If you installing the Server the configfile is write before new. Every time. So if you fix this 0.0 to 0 in my.ini the changes will be overwritten.
Somebody have to report a this bug to MySql.
EDIT:
I have report a bug to oracle:
https://bugs.mysql.com/bug.php?id=91539
The only way to get rid of this error is by allowing MySQL Installer to update when it prompts to do so at the beginning of the installation. Please note that you will get this error if you didn't allow the installer to update.
Updating lower_case_table_names = 0 in my.ini doesn't fix this because MySql will re-initialize it to 0.0 everytime before running the scripts.
If you didn't allow updates, you will need to uninstall all components of MySql and run the installer again and let it update.
First you have to uninstall mysql:
Step 1. control panel->programs and then uninstall whole mysql.
Step 2. delete folder MySQL from the following path.
C:\Program Files\MySQL
C:\Program Files (x86)\MySQL
C:\ProgramData\MySQL (your programdata folder is hidden so you have to unhide from c drive->views->options->view ->show hidden files)
4.C:\Users\hp(your pc name)\AppData\Roaming\MySQL
Step 3. windows+r write regedit.exe enter and follow the path and delete mysql Computer\HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\
Step 4. control panel->administrative tool->services then find mysql copy name then open cmd run as administrative write (sc Delete "mysql name that you copied")enter.
Now you can install MySQL
Update the installer for mysql-installer-web-community-5.7.22.1 file during the installation from the web . I encountered the same problem, after updating the installer it works correctly.
When I downgrade MySQL from 8.0.11 to 5.7.22, I encountered this error. Spend a lot of time to fix the bug. Finally, I fix this problem by the following steps:
uninstall all the related features with MySql( use Control Panel > Programs and Features)
go to C: drive, make all hidden files visible(view > hidden items), find ProgramData file
delete the MySql file inside hidden ProgramData file manually.
Make sure all the MySQL files are deleted, reinstall MySQL. It works for me. I successfully installed MySQL 5.7.22 without any problem.
My Guess: This error probably will happen if you are second or third time to install MySql server. It seems like the error happens because the old MySql files are not deleted completely. Usually, we all think that after we uninstall the application, the files are deleted from program files, it is clean, everything was done. However, there still some files hidden from us. We have to delete them by ourselves.
On bug page, last comment states that the latest installer solves this problem.
For me not. The following steps made me a clean install (after get the latest installer):
When it fails on database initialization step just cancel it back to the installer's main page where you can see installed MySQL server with a reconfigure option.
Now edit the my.ini and set the
"lower_case_table_names=0.0"
to
"lower_case_table_names=0"
Click on reconfigure and now it goes over on this problem.
Hope it helps.
I faced the same problem with 1.4.25 installer and resolved that by doing the following steps [without updating the installer]
There is a folder MySQL Installer for Windows\Manifest\Templates
In Templates folder there are few text files which are there to be used as a template during my.ini generation. I have commented out the line lower_case_table_names=
Now I execute the configuration process using installer and it executes without any error.Also I add the variable later and restart the server.
As the bug reported in https://bugs.mysql.com/bug.php?id=91476, upgrade MySQL installer to 1.4.26.0 and reinstall MySQL server would resolve the issue.
When I installed mysql server, wizard of installation was stooped at the point initializing database (if necessary) for that I did.
remove mysql folder from 'C:\ProgramData' folder. Note: ProgramData is hidden. You need to make it visible.
Uninstall mysql server if it was in the list of installed programs in control panel.
Download mysql-installer-web-community-8.0.13.0 and install it again.
I had the same problem, tried to change my.ini did't work, so I uninstalled the SQL server, then I google my operating system + Install MySQL videos (In my case "Install MySQL on Windows 8"), then I installed MySQL 5.6.26 then worked.
I think the newer MySQL doesn't support certain old operating system.

Mamp server wont start Warning: mysqli_real_connect(): (HY000/2002): No such file or directory in

Mamp servers won't start it seems apache will but mysql won't. I really have no idea what I need to do to resolve this. Please help.
Something similar happened to me, I hope that what has helped me, will also help you.
I just upgraded MAMP from 4.06 to 4.1, and, mysteriously, it has suddenly stopped working access to phphMyAdmin, with this error:
#2002 - No such file or directory - The server is not responding (or the local server's socket is not correctly configured).
After much reading and testing, this has finally been the answer that has worked for me:
phpmyadmin - error 2002 - on Mac
Steps:
Locate config.inc.php file. You can find it in /Applications/MAMP/bin/phpMyAdmin
Edit it, using some text editor (Sublime 2, TextEdit, Text Wrangler,...)
Locate this text: $cfg['Servers'][$i]['host'] = 'localhost';
Replace localhost with 127.0.0.1
$cfg['Servers'][$i]['host'] = '127.0.0.1';
Save it and close.
Restart servers (or stop and start), or just start them.
Try to access to phpMyAdmin.
It has worked for me, I hope for you too.
Simply remove two files
ib_logfile0 and ib_logfile1 from /Applications/MAMP/db/mysql56
I researched and found 2 (rather 3) solutions for this particular issue wherein Apache would start but MySQl would not. They were
1. Changing localhost to 127.0.0.1
2. Renaming the ib_logfile# to ib_logfile_#
3. Killing existing mysqld process
While none of the above approaches worked; what worked instead was the following
Surprisingly when MAMP was installed, it did not create mysql_error_log.err file under /Applications/MAMP/logs folder. I created this file under the same directory and MySQL service turned green in MAMP window. I found this file missing when I was attempting to start MySQL service directly using the bash script 'startMysql.sh' inside /Applications/MAMP/bin
Can add another cause to the problem. Since all other answers did not work for me, I took a further look into mysql_error_log.err file at /Applications/MAMP/logs folder and found the following:
[ERROR] Another process with pid 1083 is using unix socket file.
[ERROR] Unable to setup unix socket lock file.
[ERROR] Aborting
So my guess is, that somehow there was an old process of mysql stuck while shutting down the server.
Restarting my mac solved the problem, but it should also work if you kill the named process (in my case pid 1083) with:
sudo kill -1083 PID

the MySQL service on local computer started and then stopped

the MySQL service on local computer started and then stopped. Some services stop automatically if they are not in use by other services or programs.
Can anyone resolve this issue? Thanks.
After installing it by mysqld --install. Try this mysqld --initialize. We got the same problem but it's now working.
If using version 8 and you edit the my.ini I found that Notepad is putting 3 hex characters at the beginning of the my.ini file. EF BB BF. Deleting the 3 characters from the beginning of the file in a hex editor fixes the problem.
In version 8 they are accidentally putting Unicode characters in the ini file. This is causing Notepad to save the file with Byte order mark characters.
The following line in the file is the culprit "The line # range from 1 to 2^32 − 1. “Unique” means that each ID must be different." has 3 Unicode characters. This is causing notepad to append the byte order mark to the text file.
Also remember to give NETWORK SERVICE permission to the folder:
Right-click Data folder
Select Properties
Select Security tab
Click Advanced
Click Change Permissions...
Click Add...
Type NETWORK SERVICE
Click Check Names
Click OK
Select Full Control
Click OK – four times
Start MySQL service
In my case, I tried to open a DOS prompt and
go to the MySQL bin\ directory and issue the below command:
mysqld --defaults-file="C:\Program Files\MySQL\MySQL Server 5.0\my.ini" --standalone --console
And it shows me I was missing the "C:\Program Files\MySQL\MySQL Server 5.0\Uploads" folder; I built one and problem solved.
Using Community 8.0.17, upgraded from 8.0.16
There may be a more secure way of doing this, but since I'm just running a dev box:
navigate to the \data folder
make SURE the \data folder is EMPTY. If files exist the --initialize option will fail
give SYSTEM Full Control permissions on the \data folder
go back to your command prompt
run mysqld --initialize
you should see all of the required data file structures in the data folder now. If they are not created, the mysqld process has contention or improper security to write into the folder correctly.
Now start your named service in whatever fashion you want (SC/NET/service.msc, etc)
Assuming all of the files were created properly by --initialize the service will start.
Open Service
Right click on MYSQL service
select Log on
check local system account
start service
This may be because of changing lower_case_table_names after a server has been already initialized.
From the docs:
lower_case_table_names can only be configured when initializing the
server. Changing the lower_case_table_names setting after the server
is initialized is prohibited.
The solution to this problem is to set lower_case_table_names parameter at server installation as described in the following answer:
Can't set lower_case_table_names in MySQL 8.x on Windows 10
I see this error when I install MySQL 8.x, edit the max_allowed_packet in the my.ini file, and then restart mysql on a Windows 10 machine. My recommendation, to avoid this issue, is to edit the my.ini file in a hex editor (something like Frhed). DO NOT USE NOTEPAD. It does something to the hex layout of the .ini file.
Follow the below instruction as below to save your day:
If you modify my.ini not correct, you will find the trouble "the MySQL service on local computer started and then stopped". So you need to check your my.ini in "C:\ProgramData\MySQL\MySQL Server 8.0\my.ini" again to make sure there is no strange command. If you don't know and want to restore to original, you can search on web with key word "my.ini configuration", download the latest and copy it to "C:\ProgramData\MySQL\MySQL Server 8.0\my.ini"
For whom delete the SQL service on Window or Linux, You can follow these step below:
(Window)
Delete Current Service
You need to stop MySQL80/MySQLXX in Service before carry out the action below
Open commandLine of Window and run as administrator
sc delete mysql80 <= If you use mysql80, it will delete MySQL80 in Service
sc delete mysql <= If you use "mysql --initliaze", it will delete MySQL in Service
The command mysqld --initialize just create MySQL in Service of Window or Linux
So when you check it Path Executable, it misses my.ini so you can't use you MySQL Server although MySQL Service is working
For MySQL80
"C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe" --install MySQL80 --defaults-file="C:\ProgramData\MySQL\MySQL Server 8.0\my.ini"
For MySQLXX
"C:\Program Files\MySQL\MySQL Server X.X\bin\mysqld.exe" --install MySQLXX --defaults-file="C:\ProgramData\MySQL\MySQL Server X.X\my.ini"
=> It will create MySQLXX Service working with my.ini
Then MySQL works normally and you won't need to install your MySQL again.
I don't use Linux or Mac so I can't instruct - But you can find the answer above for reference
This problem is so complicated and depend on MySQL Version.My problem was happened on MySQL 8.0.2. When I've config my.ini file on notepad and save it.I soleved following #jhersey29 solution https://stackoverflow.com/a/55519014/1764354 but little different approch.
my solution is restore my.ini file and edit config value via Option files on WorkBench Application.
workBench Menu Example
Search for services.msc and look up through your services that are running if there is a mysql service running already other than the one you want to run (it could be xampp or wamp) or another service (for example Skype) using the same port as mysql and stop the service so you can run your mysql service.
This error happened in my case when secure-file-priv was pointing to unexistent folder, make sure it exists and readable.
The line of code example in my.ini:
secure-file-priv="D:/MySQL/uploads"
Nothing was working for me but then I checked here. I ran that command qc sc mysql57 and copied the value of BINARY_PATH_NAME from it. After that I checked this and changed the value of lower_case_table_names from 0 to 2 in my.ini file. Then in the command prompt, I ran this command - << BINARY_PATH_NAME >> --install-manual. After that, I started the MySQL57 service and it worked.
You also might have accidentally added some wrong text in my.ini file. Make sure no invalid character is added at the beginning of the file.
Rename or delete the folder under,
C:\ProgramData\MySQL\MySQL Server 5.7
folder name change as per your MYSQL version number.
I had this issue after my database was working fine for long time. It turned out it was some data corruption.
In the error log I had:
2017-02-07T10:11:42.270567Z 0 [ERROR] InnoDB: Ignoring the redo log due to missing MLOG_CHECKPOINT between the checkpoint 44002250712 and the end 44002250240.
2017-02-07T10:11:42.270606Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2017-02-07T10:11:42.577436Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2017-02-07T10:11:42.577470Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2017-02-07T10:11:42.577484Z 0 [ERROR] Failed to initialize plugins.
2017-02-07T10:11:42.577488Z 0 [ERROR] Aborting
Then I had to delete the 2 ib_logfile* files, and it restarted again.
my.ini file should save as (Encoding) ANSI not UTF-8 or others files.
I have faced the same situation. I have changed the server-id=2 and when saved got this error. After a lot of research, I have found the solution.
In windows after
changing my.ini mysql configuration file, save the file as
ANSI rather than UTF-8
This has worked for me well.
another instance of mysql like 5.6 or 8 run at the same time
and the 80 port was reserved
please > go to >> services>> stop all another instance >> disable them
in my case problem solved and service started as well
Changing xampp folder's permission in windows to full control for 'authenticates user' fixed my problem.
In my case, mysqld was starting and stopping with no error message. I needed to open command prompt using "Run as Administrator", and then run mysqld.
I am only doing this for temporary development. I would not recommend running MySQL as an administrator in any case.
This was the final step after the above troubleshooting.
Delete or rename the 2 following files from "C:\ProgramData\MySQL\MySQL Server 5.7\Data":
ib_logfile0
ib_logfile1
The same problem happened with me also, nothing worked... I first deleted the service (in my case MySQL80 and MySQL) by command:
sc delete MySQL80
sc delete MySql
and then reinstalled MySQL. Mine was MySQL 8.0. And then everything was back to normal.
the MySQL service on local computer started and then stopped
This Error happen when you modified my.ini in C:\ProgramData\MySQL\MySQL Server 8.0\my.ini not correct.
You can search my.ini original configuration or checking yours to make sure everything is OK
If you came across this while installing WAMP64 on Windows 10. Check if data folder in MySQL folder is missing. My WAMP 3.2.3 version installation failed to create such a folder. So wamp icon was orange (1 of 2 services running).
A quick fix was to run this command from MySQL location.
C:\wamp64\bin\mysql\mysql5.7.31\bin\
mysqld --initialize-insecure
non of the above actually works so delete mysql,reinstall mysql,restore back if any...enjoy
I had the exact same message as displayed in the question. I have tried many suggestions with little luck. I was about to install WAMP (I'm on Windows) and was about to uninstall MySql 8.0 first, when I noticed a program included in the installation: 'MySQL Installer - Community' so I tried that. With this installer I set up a new connection, added password to root, added another user with password, set my choice of locations for all logs and ran the install.
The result was that it now totally works.
Such a problem can very often come due to configuration errors.
Vivek Sethi mentioned 20th December 2012 that it is possible to get logging in the console by running the following command:
C:\Windows\system32>"C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld" --defaults-file="C:\Program Files\MySQL\MySQL Server 5.5\my.ini" --standalone --console
Right-clicking on my service in Windows 10, I recognized the --defaults-file= parameter, and with console logging I was able to see what was wrong in my configuration. In my case the path to datadir= and secure-file-priv= was wrong. I hope others can be empowered as well by being able to see logging details in the console. Good luck!
make sure your data folder is fully empty before use command mysqld --initialize
Go to "C:\ProgramData\MySQL\MySQL Server 8.0\Data\[machine name].err" and check the last rows - it should tell you why it failed. In my case it was duplicated tablespace id between databases.
It looks like this:
2021-09-12T05:19:22.815152Z 0 [Warning] [MY-010915] [Server] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2021-09-12T05:19:22.818357Z 0 [System] [MY-010116] [Server] C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.22) starting as process 30664
2021-09-12T05:19:22.866774Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-09-12T05:19:22.908983Z 1 [ERROR] [MY-012209] [InnoDB] Multiple files found for the same tablespace ID:
2021-09-12T05:19:22.911667Z 1 [ERROR] [MY-012202] [InnoDB] Tablespace ID: 124 = ['db1\accounts.ibd', 'db2\accounts.ibd']
2021-09-12T05:19:22.915514Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Failed, retry may succeed.
2021-09-12T05:19:22.918627Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
2021-09-12T05:19:22.927714Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2021-09-12T05:19:22.930912Z 0 [ERROR] [MY-010119] [Server] Aborting
2021-09-12T05:19:22.934432Z 0 [System] [MY-010910] [Server] C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe: Shutdown complete (mysqld 8.0.22) MySQL Community Server - GPL.

Errors with MySQL 5.7 installation on Mac OS X El Capitan

I need some help here to understand installing and initializing MySQL on my local Macbook. First I have installed MySQL using the DMG file and everything looks like it worked fine. I even tried doing some basic hello-world type of activities on the database to get a feel of it.
Then next I came across this page in the documentation that explained the process of initializing the data directory. I got really puzzled, and just decided to uninstall MySQL following the instructions here and go through the whole installation process again. My goal for doing so was so that I could follow the initialization instructions as stated in the documentation before I started using the database, unlike in the first time round, where I started using it before I had initialized.
I found the process of initialization to be quite tricky and confusing. As I was at the step running the command
shell> bin/mysqld --initialize --user=mysql
the errors popped up
2016-01-17T17:28:21.145457Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-01-17T17:28:21.162124Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.
2016-01-17T17:28:21.162188Z 0 [ERROR] Aborting
and then I another part of the documentation entitled Initializing the Data Directory Manually Using mysql, that accounted for this error and actually said:
If a data directory exists and is not empty (that is, it contains files or >subdirectories), the server exits after producing an error message:
[ERROR] --initialize specified but the data directory exists. Aborting.
In this case, remove or rename the data directory and try again.
As of MySQL 5.7.11, an existing data directory is permitted to be nonempty >if every entry either has a name that begins with a period (.) or is named >using an --ignore-db-dir option.
So that was what I did and I could proceed with the initialization. After that I continued with starting up the server normally,
After you initialize the data directory by starting the server with -->initialize or --initialize-insecure, start the server normally (that is, >without either of those options) and assign the 'root'#'localhost' account >a new password:
a sequence of steps I shall not quote here
and finished up the rest of the instructions in the docs, and then shutting down the server.
But I realized then the dedicated MySQL pane in the System Preferences of my Mac, which shows whether or not MySQL server is running or not, still showed that MySQL Server Instance was still running. It reminded me of the possibility that I perhaps I did not do enough to have removed the MySQL pane from System Preferences, and what I was seeing was a ghost from my first installation. I wanted to eliminate that, so I went through the whole process, uninstalling and the installing from DMG and initializing MySQL again. But this time, when I try running the server, I get a new error :
Kohs-MacBook-Pro:mysql Kohaugustine$ sudo bin/mysqld_safe --user=mysql &
[2] 15041
Kohs-MacBook-Pro:mysql Kohaugustine$ 160117 11:52:56 mysqld_safe Logging to '/usr/local/mysql-5.7.10-osx10.9-x86_64/data/Kohs-MacBook-Pro.local.err'.
160117 11:52:56 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql-5.7.10-osx10.9-x86_64/data
160117 11:52:58 mysqld_safe mysqld from pid file /usr/local/mysql-5.7.10-osx10.9-x86_64/data/Kohs-MacBook-Pro.local.pid ended
And right now, MySQL server just refuses to startup, no matter how many times I try. Not even when I do it using the GUI through the System Preferences, clicking on Start MySQL Server icon has literally no effect.
I don't know what to do right now, and would greatly appreciate any help on this!
All this just really puzzles me, and I also have the following questions for which any answers on will be of great help:
Why was the data directory already created upon the automated installation from the DMG file? Did the DMG installation also do an initialization already? In that case, then why does the docs still tell us to initialize our installation?
Is the method of uninstalling MySQL that I followed from the instructions I have posted above correct? Does this procedure of uninstallation actually remove MySQL pane from System Preferences?
Its been pretty frustrating trying to install MySQL, but perhaps this has to do with my overall inexperience with databases in general.
Thank you very much.
MySQL could be shutting down because of a permissions issue with your data directory. I just ran into that problem yesterday. Try the following command:
sudo chown -R mysql /usr/local/mysql-5.7.10-osx10.9-x86_64/data
This will change the owner of the data directory to match the user that you're using to run the MySQL daemon. For what it's worth, on my Macbook (Yosemite, MySQL 5.5), the user is "_mysql" instead of "mysql". So you should double-check that.
As for your other questions...
I believe the data directory comes as part of the MySQL package that you download. MySQL keeps information about itself in several MySQL databases. Those databases should be in the data directory when you do a fresh install.
I haven't tried uninstalling MySQL yet, but the steps look like they should work. Specifically, the line about removing files from the PreferencePanes folder should remove the MySQL pane from System Preferences (following a reboot). The bits containing:
sudo rm -rf .../my*
make me a little uneasy though.
Do you have any *nix experience? I think that would help you more than familiarity with databases in this particular case, as you're going under the bright candy shell of OS X and getting into the dark, chocolaty center that is BSD Unix.
Hope this helps. Good luck!

Installing mysql noinstall zip archive

I've been trying to use my mysql noinstall zip archive and the steps that I found in some of the websites are not descriptive. Can someone help?
If you follow the instruction here you will be alright. From that page:
Users who are installing from the noinstall package can use the instructions in this section to manually install MySQL. The process for installing MySQL from a Zip archive is as follows:
Extract the archive to the desired install directory
Create an option file
Choose a MySQL server type
Start the MySQL server
Secure the default user accounts
To start the sever run
mysqld --console
and after that run
mysql -u root
to start doing whatever you want.
Notice that MySql will function exactly the same as if you would have installed or configured it to run as a service. Your schema's are stored on disk. If you start it after you've stopped it your previous data will still be there. So it doesn't turn magically into an in-memory database.
If you want to install the MySQL database as a service you can use the command below.
mysqld.exe --install