Windows»MySql for Windows
  • RSS Feed

Last modified on 1/14/2019 1:30 PM by User.

Tags:

MySql for Windows

We have instructions for installing MySQL 4.1 and 5.5.  As of 05/05/11 the preferred version is 5.5.

If MySQL is already installed and all you need to do is create a new service for it then jump to these instructions: Create a new Profits Plus service or Maxene Reporter service.

The installation links below will tell you the exact download files you will need depending on the version of Windows. We keep copies of the MySQL 5.5 in 32 and 64 bit versions on OneDrive \SoftwareTools\mysql but you can also Google "MySql 5.5 download" for the MySQL website to download from.  Save the download to \u\mvs\au\mvs_tools\download.

For Profits Plus you'll need to install some special windows utilities.  We store them in different places.  If they are already in the win32/bin directory then you don't have to install them again.

OneDrive \SoftwareTools\sed_win32\sed-4.0.9.exe  (self-extracting zip file) 

  • Send the sed-4.0.9.exe file to the remote windows machine in a temp directory.
  • Click on the exe file to extract all files.
  • Click on the setup.exe file to run the setup.
  • Let it install into the default directory c:\program files\GnuWin32 because it installs a bunch of files you don't want in /u/mvs/win32/bin.
  • After the install copy the .exe and .dll files in c:\program files\GnuWin32\bin into /u/mvs/win32/bin

MVS: /u/mvs/win32/bin/tr.exe  (not a zip file, this is the actual program)

  • This is a standalone executable and can just be copied to the windows machine /u/mvs/win32/bin directory.

 

Installing MySQL versions older than 4.1.5

We say to remove previous versions of MySQL but be careful NOT to remove previous versions that were not installed for Profits Plus or Maxene Reporter.  Some machines will already have MySQL installed for other applications.  Don't delete those.

Remove previous versions of MySQL:

  • Use profits Plus "Move files" to move all tables back to random files.
  • It is advisable to close the Computer Management Services utility while performing server installation or removal operations from this command line. This prevents some odd errors.
  • Shutdown the current MySQL server with:
    • C:\> C:\u\mvs\mysql\bin\mysqladmin -u root shutdown

     

  • As of 9/28/06 we used MySQL 4.1 but we only install version 5.5 on new systems now.  If you need to re-install 4.1 mysql you can find an installation zip file on OneDrive  \SoftwareTools\mysql\mysql-4.1.12a-win32.zip
  • As of 5/5/11 the approved version is MySQL 5.5 and you can download it from the mysql web site.  It comes in 32-bit and 64-bit flavors. We have already installed a 64-bit version successfully on Windows 2008 Server R2
  • copy the .zip file or setup.exe file to /u/mvs/au/inbox
  • click on the .zip file to display it's contents.  There should be only 1 file named setup.exe
  • right click on setup.exe and choose extract from the pop-up menu and extract it to /u/mvs/au/inbox
  • click on /u/mvs/au/inbox/setup.exe
  • choose the remove option.

Install the new version of MySQL:   This will install a single instance of the MySQL service. The instructions below will show you how to convert the my.ini file to support multiple services from the same MySQL installation.

Use this link for specific instructions to install MySQL 4.1  (deprecated)

Use this link for specific instructions to install 32 or 64 bit MySQL 5.5 (recommended)

Use this link for specific instructions to install 32 or 64 bit MySQL 8.0 (recommended)

Use this link for specific instructions to install 64 bit MySQL 5.5  (deprecated).

** End of normal installation procedures **

Helpful commands in case you need them.

Shutdown server:

C:\> C:\u\mvs\mysql\bin\mysqladmin -u root shutdown

Copy Profits Plus tables from one database to another.

CREATE TABLE `250002`.fohtrx_dat LIKE `250001`.fohtrx_dat;
INSERT INTO `250002`.fohtrx_dat SELECT * from `250001`.fohtrx_dat;
CREATE TABLE `250002`.fohtrx_dat_del LIKE `250001`.fohtrx_dat_del;
INSERT INTO `250002`.fohtrx_dat_del SELECT * from `250001`.fohtrx_dat_del;
CREATE TABLE `250002`.dict_fohtrx_dat LIKE `250001`.dict_fohtrx_dat;
INSERT INTO `250002`.dict_fohtrx_dat SELECT * from `250001`.dict_fohtrx_dat;

 

Possible Problems when the client is on unix and the server is on windows.

Problem:
 Profits Plus hangs right after entering the "b" command on a unix computer.  (MySQL is on a windows machine.)
Solution: Verify that port 3306 is enabled on their windows firewall software.

 

Problem:
If the mysql server is on a windows machine but Profits Plus is on a unix machine you might be getting a this message when you try to move a file from dsk0 to sql.  "ERROR 1251: Client does not support authentication protocol requested by server; consider upgrading MySQL client."
Solution: Go to the windows Mysql client and login as mysql and enter these commands at the mysql prompt.
   
 

mysql> SET PASSWORD FOR 'mvuser'@'localhost' = OLD_PASSWORD('mvuser1');
mysql> SET PASSWORD FOR 'mvuser'@'%' = OLD_PASSWORD('mvuser1');

 

Problem: S/M task "20. Move files" results in an error 142 when you try to move a file to SQL.
Solution: Use Windows explorer to manually create the mysql data subfolders like "C:\u\mvs\mysql\data\250001".  and 210001 and so forth.  Create all the directories for all companies that might ever need MySql.   Do it now because you won't remember this solution 6 months from now.
   

 

Problem: You get this message on a unix machine when moving files to SQL on a Windows machine.  

dynamic linker : mysql : error opening /usr/local/lib/libncurses.so.4
sh: 12441 Killed

 

Solution: This is the unix mysql client looking for this file.
ftp the /usr/local/lib/libn* files from our mvs machine to the customers unix machine. You might have to create the directories for /usr/local/lib on the customer's unix machine.
   

 

Problem:  When the mysql client is on unix, but the mysql server is on another machine you get

ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

Solution This isn't a problem with the socket file.  You don't need any socket files if the mysql server is on another machine.  The problem is the client can't find the mysql server because it is on a different machine.

Create (or modify) the /u/mvs/dsk0/002002/mysql.sh script so it specifies the host where the server is.   Add the -h command line option when invoking the mysql client.

mysql -h 192.168.1.61 -umvuser -pmvuser1

   

 

Problem: There is a 5 second delay every time the Unix box tries to connect with the windows MySQL server.  The delay occurs every time a program returns to the main menu.
Solution: This happened at Burks.  They needed to add the hostnames of the Unix and the Windows machines to their DNS service. MySQL was trying to authenticate the hostname of the Unix box with a DNS lookup.  It took 5 seconds to fail the authentication but it allowed the MySQL task to continue anyway.

When both hosts names are in the DNS service, the authentication does not delay at all.

FYI: you can turn off the MySQL authentication attempt entirely by setting an option with the MySQL windows administrator program.  START -->MySQL --> MySQL Administrator --> "Start up Variables" category -->  "Advanced Networking"  Tab --> "Disable name resolving" check box.

   

 

Problem: You might be asked to set up a read-only MySQL user.  You can do it with the following commands but you can't make this a Profits Plus user because all Profits Plus users will need all privileges.
Solution: GRANT ALL PRIVILEGES ON *.* TO 'guest'@'localhost' IDENTIFIED BY 'guest1';

GRANT ALL PRIVILEGES ON *.* TO 'guest'@'%' IDENTIFIED BY 'guest1';
REVOKE ALTER, CREATE, CREATE USER, DELETE, DROP, INSERT, UPDATE, SHUTDOWN, SUPER ON *.* FROM 'guest'@'localhost','guest'@'%';