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

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

Related

Cannot find mysql bin file in macos

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 am stucked while hMailServer server database setup and it is showing following error

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: C:\Program Files (x86)\hMailServer\Bin\libmysql.dll
It's a bit more complicated.
You should read this Article which explain why it can be problematic with hMailServer 5.6.x
and MySQL 8.x or higher
Support article:
https://www.hmailserver.com/forum/viewtopic.php?f=10&t=33531
MySQL-Archive Downloads for MySQL 5.x compatible libmysql.dll versions
https://downloads.mysql.com/archives/community/

setup mysql for wordpress manually

I installed mysql and apache. Apache is serving wordpress correctly and I want to install wordpress via install.php. This fails at setup step 2 after inserting database name, user and password (error 500).
I suspect that I haven't correctly finished the mysql database setup.
So to check, I log in to mysql via mysql -u root -p and run select database(); which returns null. So there is no database. Then when I call create database wordpress it says the db already exists. So what??
Just in case someone asks why not use xampp or wamp or the like: I want to set up everything by hand to learn the basics.
System setup: Windows 8.1 64 bit, mysql 5.7.21, apache 2.4, php 7.2.4 w/ thread safe
In the php.ini file you have to enable two settings:
extension = mysqli
extension_dir = "ext"
The root cause was that I had only activated the extension setting.
The website where I found this tip did not mention the requirement to also set the extension directory.
The final solution is from the official guide to install mysqli, which is very misleading in this regard:
For PHP > 5.3 it says
On Windows, for PHP versions 5.3 and newer, the mysqli extension is
enabled and uses the MySQL Native Driver by default. This means you
don't need to worry about configuring access to libmysql.dll.
But this was not true for me. It did not work out of the box.
For older versions (e.g. ones which should not affect my version) it says
As with enabling any PHP extension (such as php_mysqli.dll), the PHP
directive extension_dir should be set to the directory where the PHP
extensions are located. See also the Manual Windows Installation
Instructions. An example extension_dir value for PHP 5 is c:\php\ext.
This was the final hint that got it working.

Error 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)

Please don't post this question as duplicate. I am trying to configure mysql for about 3 weeks now. Someone should really help me.
I recently installed MySQL 5.1 in a Lenovo laptop to do my project. The laptop is running on Windows 8.
The installation was fine but when I tried to configure MySQL it worked till the last page.
There am getting Error Nr 2003.
I tried it through the command prompt, through services in the control panel. But the problem is that the mysql service is not starting at all. Why it is not starting ? What will be blocking it from starting ?
First you need to start mysql service it is the problem for this above
error.
In case you cant start mysql service means you need to install mysql service.
Steps for install mysql service
Step 1: open command prompt and go to the mysql installed location (for example c:\Program Fiels\MYSQL\Mysql Server5.0\bin\)
Step 2: mysql --install
Step 3: start mysql service using the command NET START MYSQL command
then connect mysql using username and password.
Assuming the service is already running and you still get this error connecting to the localhost using the mysql client, then make sure you have an entry for "localhost" in your hosts file. This was the case I experienced.
I resolved this situation following the following process. After adding the MySQL path to the environment, I kept invoking the program and then checking Event Viewer in the Application Log for MySQL errors that referenced old commands in the ini file. After removing them, what was hanging me up was that the installer was looking for errmsg.sys in a folder that didn't exist, \bin\share. Those folders DO exist, but on the same level, not nested. So I added the folder share to bin and copied errmsg.sys from share to the new nested share, and it worked.
Now that its running, I intend to redo a proper configuration using the workbench, just to gets my ducks in a row.
hth
Go to Run type services.msc. Check whether MySQL services is running or not. If not, start it manually. Once it started, type mysqlshow to test the service.

MySQL command line client for Windows

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