Set up rails to find the default location of LIBMYSQL.dll - mysql

I am on windows 7 and set up mysql through XAMPP.
I am now starting a new rails project (my first time developing in rails), and just set up the project.
I wanted to start the server so I used rails server. However it is complaining that
"The program can't start because LIBMYSQL.dll is missing from your computer"
I know where libmysql.dll is stored at, so how do I tell rails to look there?

Libmysql.dll file is located in the bin directory of your mysql installation.
There also needs to be a copy of it in the Ruby\bin directory.
Copy it there and restart your server or console, if you are already run it.

Related

MySQL Workbench Unable to Retrieve Disk Space in Data Dir, Server Stopped

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

Reinstall mysql in Xampp for Windows 10

I was trying to delete other file but mistakenly I did shift+del for my mysql folder under Xampp. Now my entire application running in localhost is not able to locate mysql. My bad!!
Is there any way out to recover that folder or reinstall just the mysql in Xampp. I tried Easeus and Yodot software for folder recovery but none of them proved no luck to detect my permanently deleted folder.
Please suggest me what can be the alternative way out.
P.S. I am having my mysql config file backup saved.
I think the simple and better way is reinstall the xampp e.g to folder xampp2 then move your script into the htdocs of the new install

How do i connect HmailServer to MySQL( in WAMP)?

enter image description hereI'm try to install hmailserver in combination with wamp/mysql.
I get an errormessage, hmailserver recommends to copy a file manually.
copypaste:
Error:
The MySQL client (libmysql.dll, 32 bit) could not be loaded.
hMailServer needs this file to be able to connect to MySQL.
The MySQL client needs to be manually copied to the hMailServer Bin directory. The file is not included in the hMailServer installation.
Path: H:\Program Files (x86)\hMailServer\Bin\libmysql.dll.
I don't see MySql in the service (Step 5 in the "HmailServer Database Step up -Step 5 of 7). And wampapache doesn't work either.
Thank you for the help.
enter image description here
I figured it out. I go into "C:\wamp\bin\mysql\mysql5.7.14\lib" right click "libmysql.dll" next press copy. I go to "C:\Program Files (x86)\hMailServer\Bin" and paste the copied file into it
The MYSQL Server service is called wampmysqld or if you have the 64bit WAMPServer wampmysqld64
However I would suggest that you take the other option and use the SQLServer database with hmailserver.
If you use MySQL which I admit seems like the most obvious option, then every time you ADDON another MySQLServer version to WAMPServer you will have to migrate the hmailserver database over to the new MySQL, and like me forget to do so.
If you use the built in SQLServer database with hmailserver, you can basically forget about hmailserver whenever you change something in WAMPServer's MySQLServer versions.
Regarding hMailServer and MySQL 8.x
It doesn't matter if you run a 32-Bit or 64-Bit MySQL Server on the same Windows
Machine or on a Remote server (regardless which OS) as long as you have the required libmysql.dll file in hMailServer /bin folder or a at your PATH Environment variable.
Regarding MySQL 8.x:
MySQL 8.x enables per default its new API API which is incompatible with
all hMailServer versions. You need to configure MySQL 8.x in mixed mode which allows
5.7.x MySQL Clients to connect to make it work with hMailServer. You also can use
a MySQL 5.7.x Release without any configuration to make it work out of the box.
For more info see: https://www.hmailserver.com/forum/viewtopic.php?f=10&t=33819

Can't build the MySQL drivers (Qt)

I'm trying to build the MySQL drivers for Qt. I've downloaded and installed the MySQL Server files and I also got the Qt source files. After that i've tried to build the MySQL plugin, by opening the MySQL pro file (located at Qtbase/src/plugins/sqldrivers/mysql) and I've add path to the MySQL Server files (include and lib). When I now try to build it, I get the error "cannot open file 'mysql.lib'". So I checked if there is a mysql.lib file in the MySQL Server lib path and there wasnt, so I downloaded the C++ MySQL connector, but it doesnt contain a mysql.lib file either. So I need help, I'm not sure if I'm doing it right and if so, where can I get the mysql.lib file?
Thanks for all the help
Greets
Steven

Mysql database didn't working after overwritting installing wamp.

I am using wamp server. I have made some project and there are some also databases.
I install new window and then i install wamp server in same drive where the wamp sever is.
After installing wamp my project file in "www" are present as pervious but in phpMyAdmin there is only database name is present when I open it there is no table. where the tables gone ???
I check the "wamp>mysql>data". Here the files are present of that tables but it does not show in the phpmyadmin.
I need these tables how can I recover it.
I suggest to you ,use the feature in windows called "restore previous versions" .
Right click the Wamp folder click Restore previous versions and select the most recent date you know it was working,it maybe work for you.
I assume you mean that you did ...
Install new windows.
Install WampServer on new windows
Copy my old\wamp\www folder to the new install
Copy the subfolders in \wamp\bin\mysql\mysql{version}\data to the new install
If this is correct, then dont forget to copy the contents of \wamp\bin\mysql\mysql{version}\data as well. If you are using INNODB database the actual data lives in the ibdata1 file in that folder.