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
Related
I am having a lot of problems with mysql on macos 10.14. It started with trying to reset my password. Back when I collaborated with someone in 2018 my collaborator used mysql but I did not know how to work it. I have a feeling that the password I used for mysql is not the typical password I used because my attempts to log in failed. watching this video I was told at 9:12 that the password would be set on installation but that turned out to be false. I was never asked for a password upon downloading but perhaps that is because I had part of mysql already downloaded on my computer but I did not have the workbench installed. All of my attempts to reset the password failed. So I then tried deleting mysql and redownloading. Now I am not able not to start the mysql server from mac's system preferences. But that's not my largest problem. I still cannot reset the password and hence even use the app. Following official mysql instructions I cannot reset the password because it requires the location of a pid file. It says
Stop the MySQL server if it is running. Locate the .pid file that contains the server's process ID. The exact location and name of this file depend on your distribution, host name, and configuration. Common locations are /var/lib/mysql/, /var/run/mysqld/, and /usr/local/mysql/data/.
In the folder for mysql located in /usr/local/var/mysql there is no pid file. A lot of the tutorials I've seen recommend using terminal but I cannot use terminal for mysql because I get the mysql command not found error. Ok, so to fix that problem trying this tutorial here it says:
If you’re installing MySQL using the official installer, then your MySQL bin/ folder should be located on /usr/local/bin/mysql
So now I need to find the mysql bin file but when I write ls in the /usr/local/bin folder, mysql does not come up. All of the file beginning near 'my' are
multinit
murge
nasm
So I'm stuck. I find it simply incredible that such a simple thing as resetting a password is so difficult.
Let’s say we installed MySQL version is 8.0 on our Windows OS. The bin directory is present at the following location −
C:\Program Files\MySQL\MySQL Server 8.0\bin
I had mySQL workbench working fine a few weeks ago. Now, any time I log in, I get no connection. Upon inspecting Sever Status, it is showing Stopped. Also, under the Server Directories, it says Unable to Retrieve next to Disk Space in Data Dir.
I also noticed that the configuration file was wrong, or outdated? The Configuration File originally read:
C:\ProgramData\MySQL\MySQL Server 5.5\my.ini
But I looked and there was no MySQL Server 5.5 file in my directory. I do have a MySQL Server 8.0 folder, so I changed the Configuration File to:
C:\ProgramData\MySQL\MySQL Server 8.0\my.ini
However, this fails to solve the problem. I've also attempted to run Services from the Start Menu, right click on MYSQL80, and choose start - and it says the service has Started then stopped.
I'm not even sure this missing or mis-directed file is the issue, or whether it's the Unable to Retrieve Disk error (or both are causing the server to fail). I recently changed my login password for my computer - but I doubt that is related to the login credentials for MySQL, right? (I see MYSQL80 properties has password for 'log on' option, but I have no idea what this password even is, or how to change it).
I've also read about this problem online and cannot seem to find an answer that solves the issue. I've tried running MySQL Workbench as an admin too, and that doesn't work either.
Can anyone point me in the right direction? Is there a way to get the server up and running again without a bunch of complicated command line? I appear to have mysqld.exe in the bin file in MySQL 8.0
Thanks all in advance!
In MySql Workbench Server -> Startup/ShutDown -> Start Server.
This Worked for me.
When the my.ini file is messed up I think the best solution is a total uninstall/delete and manual install. Before you do any of the following make sure you go to your current data dir and save your database folders. Then dlete all of your current MySQL related directories and uninstall MySQL and MySQL workbench.
I had this problem when I installed MySQL 8.0.15 with the community installer. The my.ini file that came with the installer did not work correctly after it had been edited. I did a full manual install by downloading that zip folder. I was able to create my own my.ini file containing only the parameters that I was concerned about and it worked.
download zip file from MySQL website
unpack the folder into C:\program files\MySQL\MySQL8.0
within the MySQL8.0 folder that you unpacked the zip folder into, create a text file and save it as my.ini
include the parameters in that my.ini file that you are concerned about. so something like this(just ensure that there is already a folder created for the datadir or else initialization won't work):
[mysqld]
basedire=C:\program files\MySQL\MySQL8.0
datadir=D:\MySQL\Data
....continue with whatever parameters you want to include
initialize the data directory by running these two commands in the command prompt:
cd C:\program files\MySQL\MySQL8.0\bin
mysqld --default-file=C:\program files\MySQL\MySQL8.0\my.ini --initialize
install the MySQL server as a service by running these two commands:
cd C:\program files\MySQL\MySQL8.0\bin
mysqld --install --default-file=C:\program files\MySQL\MySQL8.0\my.ini
finally, start the server for the first time by running these two commands:
cd C:\program files\MySQL\MySQL8.0\bin
mysqld --console
I am upgrading MySQL server 5.067 to 5.5.60 on Windows 10.
I stopped the service, replaced bin a shared directory and started the service.
Service start failed with the message (in Event Viewer):
Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
For more information, see Help and Support Center at http://www.mysql.com.
OK, so I opened cmd as admin with the command:
mysql_upgrade --port 64202
With result:
Looking for 'mysql.exe' as: C:\Program Files (x86)\XXX\MySQLServer\bin\mysql.exe
Looking for 'mysqlcheck.exe' as: C:\Program Files (x86)\XXX\MySQLServer\bin\mysqlcheck.exe
Error: Failed while fetching Server version! Could be due to unauthorized access.
FATAL ERROR: Upgrade failed
The design of MySQL upgrade is connecting over TCP to MySQL to run the upgrade, but how it can possibly work if the service is not running? It is a vicious circle - MySQL service needs to be upgraded to be able to start and mysql_upgrade needs to connect to running service.
What is wrong?
Skipping major versions (5.1) is not supported, and may or may not work. The appropriate upgrade is one of:
Plan A: Upgrade to 5.1, then to 5.5. Run mysql_upgrade at each step.
Plan B: Dump the data from 5.0 with mysqldump. (Be sure to get routines, etc). Blow away (or bypass) 5.0 and install a fresh 5.5. Load the data back in. There may be syntax errors in the dump file, edit the file if needed.
Since you're upgrading from 5.0 to 5.5, there are configuration values which are deprecated, causing the engine to be unable to start.
Most likely culprit is skip-dbd, as explained on this site.
So: find your MySQL configuration file, comment out the skip-dbd option and restart the MySQL service. Then you can run mysql_upgrade with the appropriate options including authentication.
I have installed Mysql server locally and everything was working Ok but today when I tried to get a connection to the local db, I got an error. After checking services showed that the MySql service is missing.
What is the problem?
I have done it by the following way
Start cmd
Go to the "C:\Program Files\MySQL\MySQL Server 5.6\bin"
type mysqld --install
Like the following image. See for more information.
Go to your mysql bin directory and install mysql service again:
c:
cd \mysql\bin
mysqld-nt.exe --install
or if mysqld-nt.exe is missing (depending on version):
mysqld.exe --install
Then go to services, start the service and set it to automatic start.
I also face the same problem. do the simple steps
Go to bin directory copy the path and set it as a environment variable.
Run the command prompt as admin and cd to bin directory:
Run command : mysqld –install
Now the services are successfully installed
Start the service in service windows of os
Type mysql and go
I came across the same problem. I properly installed the MYSQL Workbench 6.x, but faced the connection as below:
I did a bit R&D on this and found that MySQL service in service.msc is not present. To achieve this I created a new connection in MySQL Workbench then manually configured the MySQL Database Server in "System Profile" (see the below picture).
You also need to install MySQL Database Server and set a configuration file path for my.ini. Now at last test the connection (make sure MySQL service is running in services.msc).
If you wish to have your config file on a different path you have to give your service a name:
mysqld --install NAME --defaults-file=C:\my-opts2.cnf
You can also use the name to install multiple mysql services listening on different sockets if you need that for some reason.
You can see why it's failing by copying the execution path and adding --console to the end in the terminal.
Finally, you can modify the starting path of a service by regediting:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\NAME
That works well but it isn't as useful because the windows service mechanism provides little logging capabilities.
Go to
C:\Program Files\MySQL\MySQL Server 5.2\bin
then Open MySQLInstanceConfig file
then complete the wizard.
Click finish
Solve the problem
I think this is the best way to change the port number also.
It works for me
Is there any nice command line MySQL client for windows? I mean a single exe that allows connecting and running a sample query. I've googled and only could find big graphical environments like toad or mysql workbench. I need only a simple command line tool, where can I download sth like this?
EDIT: I don't want to install the whole MySQL package on my PC. I know it's inside the mysql package but how do I download only this cmd line client. Because i don't need anything else.
When you go to the MySQL download page, choose the platform "Microsoft Windows". Then download the "Windows (x86, xx-bit), ZIP Archive" (be sure to select the one with size over 140M.
The binaries will be in the "bin" folder.
I understand that this is not just the client binaries, but at least you don't have to install and setup the entire server.
mysql.exe can do just that....
To connect,
mysql -u root -p (press enter)
It should prompt you to enter root password (u = username, p = password)
Then you can use SQL database commands to do pretty much anything....
You can choose only install the client during server install. The website only offers to let you download the full installer (grab whatever version you want from http://www.mysql.com/downloads/mysql/).
In the install wizard, when prompted for installation type (typical, minimal, custom), choose 'Custom'. On the next screen, select to NOT install the server, and proceed with the rest of the install as normal.
When you're done, you should see just the relevant client programs (mysql, mysqldump, etc) in C:\Program Files\MySQL..\bin
Its pretty simple. I saved the mysql community server in my D:\ drive. Hence this is how i did it.
Goto D:\mysql-5.7.18-winx64\bin and in the address bar type cmd and press enter, so command prompt will open. Now if you're using it for the first time type as mysql -u root -ppress enter. Then it will ask for password, again press enter. Thats it you are connected to the mysql server.
Before this make sure wamp or xampp any of the local server is running because i couldn't able to connect to mysql wihthout xampp running.
Happy Coding.
You can also download MySql workbench (31Mo) which includes mysql.exe and mysqldump.exe.
I successfully tested this when i had to run Perl scripts using DBD:MySql module to run SQL statements against a distant MySql db.
You can access mySQL in command line just by typing:
C:\www\mysql\bin> mysql -u root -p
After which you can type sql commands normally such as:
mysql> SHOW DATABASES;
Here, I am assuming you mySQL installation directory is C:\www\mysql.
I have similar requirement where I need a MySQL client but not server (running in a virtual machine and don't want any additional overhead) and for me the easiest thing was to install MySQL community server taking typical installation options but NOT configure the server, so it never starts, never runs. Added C:\Program Files (x86)\MySQL\MySQL Server 5.5\bin to system path environment variable and I'm able to use the MySQL command line client mssql.exe and mysqladmin.exe programs.
If you are looking for tools like the the mysql and mysqldump command line client for Windows for versions around mysql Ver 14.14 Distrib 5.6.13, for Win32 (x86) it seems to be in HOMEDRIVE:\Program Files (x86)\MySQL\MySQL Workbench version
This directory is also not placed in the path by default so you will need to add it to your PATH environment variable before you can easily run it from the command prompt.
Also, there is a mysql utilities console but it does not work for my needs. Below is a list of the capabilities on the mysql utilities console in case it works for you:
Utility Description
---------------- ---------------------------------------------------------
mysqlauditadmin audit log maintenance utility
mysqlauditgrep audit log search utility
mysqldbcompare compare databases for consistency
mysqldbcopy copy databases from one server to another
mysqldbexport export metadata and data from databases
mysqldbimport import metadata and data from files
mysqldiff compare object definitions among objects where the
difference is how db1.obj1 differs from db2.obj2
mysqldiskusage show disk usage for databases
mysqlfailover automatic replication health monitoring and failover
mysqlfrm show CREATE TABLE from .frm files
mysqlindexcheck check for duplicate or redundant indexes
mysqlmetagrep search metadata
mysqlprocgrep search process information
mysqlreplicate establish replication with a master
mysqlrpladmin administration utility for MySQL replication
mysqlrplcheck check replication
mysqlrplshow show slaves attached to a master
mysqlserverclone start another instance of a running server
mysqlserverinfo show server information
mysqluserclone clone a MySQL user account to one or more new users
mysql.exe is included in mysql package. You don't have to install anything additionally.
download the mysql-5.0.23-win32.zip (this is the smallest possible one) from archived versions in mysql.com website
cut and paste the installation in c drive as mysql folder
then install then follow instructions as per this page:
https://cyleft.wordpress.com/2008/07/20/fixing-mysql-service-could-not-start-1067-errors/
For Windows users:
1.Install the full version of MYSQL
2.On the Windows 10 start button click on search and type in MySQL
3. Select the MYSQL Command Line Client 5.5 (I am using version 5.5)
4. go ahead and run your sql queries/
5. to exit type \q or quit