Hi Martin, do you use Powershell? I was thinking about developing a Powershell script. I tested it and it works but I have a Windows BAT/CMD that works.
Here is a Windows DOS batch file I created. The filename can end in either .bat or .cmd File contents: mysql_stop.bat @echo off @cd /D "C:\ProgramData\MySQL\MySQL Server 8.0\Data" @echo Mysql database shutdowm custom ... @if not exist %computername%.pid GOTO exit @echo Delete %computername%.pid ... for /f "delims=" %%x in (%computername%.PID) do set CN=%%x taskkill /PID %CN% /F /T :exit I tested it and it works. Regards, Efrem On Thu, Apr 26, 2018 at 3:02 PM, Martin O'Shea <martin_os...@outlook.com> wrote: > Again, many thanks. > > > > *From:* Efrem Mc <efrem...@gmail.com> > *Sent:* 26 Apr 2018 20 01 > > *To:* Martin O'Shea <martin_os...@outlook.com> > *Subject:* Re: Unable to start MySQL in NetBeans > > > > Hi Martin, you're welcome. I am glad I was able to help. Interesting > with all the driver changes and new authentication methods. Windows works > better as a service and makes it easier to toggle services. When you run > multiple instances there are many options that must be unique such as log > files, message files, replication, and start/stop services. Hence the > problem and I believe it is true for configuring as a windows service. > > > > Thanks for letting me know. You can alway use the command line or the NET > STOP command to end the services. On the stop line, I added a '--password' > option to prompt for a password. It never sent a prompt message. So now > I am ending the database using from the command line. I will write a > script but it has its own limits. > > > > Regards, > > > > Efrem McCrimon > > > > On Thu, Apr 26, 2018 at 2:50 PM, Martin O'Shea <martin_os...@outlook.com> > wrote: > > Efrem > > > > I was just about to send it to you. You should be aware that I am now able > to Start, Connect and Disconnect to MySQL within NetBeans as well. But the > Stop option is not allowed but that is a minor concern given that I have > now set MySQL up as a Windows service. > > > > > > Many thanks > > > > Martin O’Shea. > > > > *From:* Efrem Mc <efrem...@gmail.com> > *Sent:* 26 Apr 2018 19 47 > *To:* Martin O'Shea <martin_os...@outlook.com> > > *Subject:* Re: Unable to start MySQL in NetBeans > > > > I start is working find and my stop is not working for using MySQL 8.0.11 > native. Using XAMPP services it works as they have a canned application > that fixes the limits of the DOS scripting language. Powershell is so new > and required special some configuration to execute the script. However it > gets more complex when you have multiple database instances and want to > stop specific ones. This is designated to a specific instance. > > > > Please over your Admin Property tab for MySQL. I have about 30 miin now. > > > > Regards > > > > Efrem > > > > On Thu, Apr 26, 2018, 12:19 PM Efrem Mc <efrem...@gmail.com> wrote: > > Hi Martin, send a copy of you Admin property page > > > > I think the best way to manage the service depends on its functionality. > Windows is not as nice for scripting as 'bash', PowerShell has the > equivalent power as DOS batch is limited. > > > > Efrem > > > > On Thu, Apr 26, 2018 at 11:23 AM, Martin O'Shea <martin_os...@outlook.com> > wrote: > > Efrem > > > > Unfortunately that did not work. The messages displayed were slightly > different as you can see: > > > > > > Oddly enough the file C:\ProgramData\MySQL\MySQL Server 8.0\Data\ibdata1 > has Windows read and write permissions. > > > > Many thanks > > > > Martin O’Shea. > > > > > > *From:* Efrem Mc <efrem...@gmail.com> > *Sent:* 26 Apr 2018 16 11 > *To:* Martin O'Shea <martin_os...@outlook.com> > > *Cc:* users@netbeans.apache.org; netcat <net...@netbeans.apache.org>; > Jiří Kovalský <jiri.koval...@oracle.com>; Paul Franz < > paul.fr...@oracle.com> > *Subject:* Re: Unable to start MySQL in NetBeans > > > > Hi Martin: > > > > To start try this: > > Path to start: C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe > > Arguments: --console --port 3310 --datadir="C:\\ProgramData\\MySQL\\MySQL > Server 8.0\\Data\\" --default-authentication-plugin=mysql_native_password > > > > If you are using the default port, it defaults to 3306. > > > > To stop, use Disconnect. I will have to create a custom stop such as a > script. From a command line, I was able to stop the database. > > mysqladmin --port=#### --host 127.0.0.1 --user root --password > > > > From xampp for stop, it uses a script, most interesting it contains logic > to remove the pid file if it exist. I will write a script. > > > > The other method for Windows to create a service, then you can use the > "NET STOP" to stop the service, and "NET START" to start the service. > > On your windows machine, go to a command prompt, "net start". It will > show a list or running services. These are the same services, if you look > at the process services in Taskman. Linux/Unix uses "ps". > > > > For the Admin, I am using phpmyadmin. > > > > I will connect later. > > > > Regards, > > > > Efrem McCrimon > > GUI Builder Tribe > > DB Tribe > > > > > > On Thu, Apr 26, 2018 at 9:20 AM, Martin O'Shea <martin_os...@outlook.com> > wrote: > > Efrem > > > > I am using NetBeans 8.2 on a Windows 10 64-bit PC. > > > > The Java version I have is 9.0.4 64-bit. > > > > Many thanks > > > > Martin O’Shea. > > > > *From:* Efrem Mc <efrem...@gmail.com> > *Sent:* 26 Apr 2018 14 18 > > > *To:* Martin O'Shea <martin_os...@outlook.com> > *Cc:* users@netbeans.apache.org; netcat <net...@netbeans.apache.org>; > Jiří Kovalský <jiri.koval...@oracle.com>; Paul Franz < > paul.fr...@oracle.com> > *Subject:* Re: Unable to start MySQL in NetBeans > > > > Hi Martin, I will try it. There are several methods to configure the > start and stop process and it is platform dependent. > > > > You can use configuration files or scripts. > > > > I will get back to you later. I am working now and will resume this > later. > > > > What is your configuration again and platform? I have Windows, MacOS, > Linux 64-bit, and Linux 32-bit > > > > The other information I sent was from my Windows system. > > > > Regards, > > > > Efrem McCrimon > > > > > > On Thu, Apr 26, 2018 at 8:35 AM, Martin O'Shea <martin_os...@outlook.com> > wrote: > > For all of the connections I have, there does not seems to be any issue > now connecting to MySQL 8.0.11 in NetBeans 8.2. > > > > But, I still cannot connect via the Start or Connect options on the > context menu shown below: > > > > > > The messages I get are those described below in an earlier post. Prior to > this new version of MySQL, the MySQL Server icon above in NetBeans would > always be connected by default. This is what I am trying to resolve now. > > > > *From:* Efrem Mc <efrem...@gmail.com> > *Sent:* 26 Apr 2018 13 13 > *To:* Martin O'Shea <martin_os...@outlook.com> > *Cc:* users@netbeans.apache.org; netcat <net...@netbeans.apache.org>; > Jiří Kovalský <jiri.koval...@oracle.com>; Paul Franz < > paul.fr...@oracle.com> > > > *Subject:* Re: Unable to start MySQL in NetBeans > > > > Okay, I did not mention this but I removed the last part of the connection > string on the driver. > > > > Old string: jdbc:mysql://localhost:3306/test?zeroDateTimeBehavior= > convertToNull > > > > New string: jdbc:mysql://localhost:3310 > > > > I am using port 3310 for MySQL 8.0.11. > > > > > > After connecting, I noticed the system changed a setting to: > > > > > > jdbc:mysql://localhost:3310/mysql?zeroDateTimeBehavior=convertToNull > > Display name: > jdbc:mysql://localhost:3310/dbtest?zeroDateTimeBehavior=convertToNull > [root on Default schema] > > > > This will show once you connect to a database in my case I am connected > the dbtest > > Database URL: jdbc:mysql://localhost:3310/dbtest?zeroDateTimeBehavior= > convertToNull > > > > > > > > On Thu, Apr 26, 2018 at 7:27 AM, Martin O'Shea <martin_os...@outlook.com> > wrote: > > Efrem > > > > I have been trying your suggestions in the last 30 minutes: > > > > I am able to create connections in NetBeans 8.2 to MySQL 8.0.11 using both > connectors 5.1.46 and 8.0.11 and can execute SQL commands: > > > > > > So that is an improvement in my situation. > > > > However, what I have not been able to do so far is register MySQL 8.0.11 > in NetBeans 8.2 itself, i.e.: > > > > > > And > > > > > > The results is: > > > > > > Then, if I try to start MySQL in NetBeans from the context menu, I receive > the prompt: > > > > > > And messages: > > > > 2018-04-26T11:22:58.117040Z 0 [System] [MY-010116] [Server] C:\Program > Files\MySQL\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.11) starting as > process 3364 > > mysqld: Table 'mysql.plugin' doesn't exist > > 2018-04-26T11:23:00.260993Z 0 [ERROR] [MY-010735] [Server] Can't open the > mysql.plugin table. Please run mysql_upgrade to create it. > > 2018-04-26T11:23:00.993556Z 0 [Warning] [MY-010015] [Repl] Gtid table is > not ready to be used. Table 'mysql.gtid_executed' cannot be opened. > > 2018-04-26T11:23:02.212455Z 0 [Warning] [MY-010068] [Server] CA > certificate ca.pem is self signed. > > 2018-04-26T11:23:02.219559Z 0 [ERROR] [MY-010262] [Server] Can't start > server: Bind on TCP/IP port: Unknown error > > 2018-04-26T11:23:02.219766Z 0 [ERROR] [MY-010257] [Server] Do you already > have another mysqld server running on port: 3306 ? > > 2018-04-26T11:23:02.220053Z 0 [ERROR] [MY-010119] [Server] Aborting > > 2018-04-26T11:23:04.027661Z 0 [System] [MY-010910] [Server] C:\Program > Files\MySQL\MySQL Server 8.0\bin\mysqld.exe: Shutdown complete (mysqld > 8.0.11) MySQL Community Server - GPL. > > > > Yet table mysql_plugin does exist under 8.0.11. > > > > Similarly when trying to connect to the registered version of MySQL, I > receive: > > > > > > Have you any idea about these at all? > > > > Thanks > > > > Martin O’Shea. > > > > *From:* Efrem Mc <efrem...@gmail.com> > *Sent:* 26 Apr 2018 12 11 > *To:* Martin O'Shea <martin_os...@outlook.com>; users@netbeans.apache.org; > netcat <net...@netbeans.apache.org> > *Cc:* Jiří Kovalský <jiri.koval...@oracle.com>; Paul Franz < > paul.fr...@oracle.com> > *Subject:* Re: Unable to start MySQL in NetBeans > > > > Hi all: > > I have the following running on this system concurrently MySQL 5.6 on port > 3308, Maria DB 10.x on port 3306, MySQL 8.0.11 on port 3310, and Oracle XE > Express on port 1521. Several Apache & Tomcat servers running on different > ports and all working. > > > > > > On Thu, Apr 26, 2018, 1:26 AM Efrem Mc <efrem...@gmail.com> wrote: > > Tested on NB 9.0 build 413 using MySQL 8.0.11 using legacy > authentication. This works! > > Pictures for proof. > > Efrem > > On Thu, Apr 26, 2018 at 12:51 AM, Efrem Mc <efrem...@gmail.com> wrote: > > Hi all: > > > > Once the connection was made, I ran a command: create database dbtest > > It works! > > > > Now testing on NB 9.0 beta build 413 on Windows and MacOS. > > > > Regards, > > > > Efrem > > > > On Thu, Apr 26, 2018 at 12:29 AM, Efrem Mc <efrem...@gmail.com> wrote: > >> Hi all: > >> > >> Here is something to review. Starting in mySQL 8.0.11, there is a new > >> authentication method; Use Strong Password Encryption for > >> Authentication using SHA256-based password methods or Legacy > >> Authentication Method (Retain mySQL 5.x Compatibility). If you select > >> the Strong Password Encryption method, a new connector and clients > >> (caching_sha2_password authentication) is needed. The system admin > >> can select which method to use. For compatibility, I selected Legacy > >> authentication and different connector. > >> > >> The default connector in NB 8.2 for mySQL uses the following: > >> > >> Driver: C:\Program Files\NetBeans > >> 8.2\ide\modules\ext\mysql-connector-java-5.1.23-bin.jar > >> Driver class: com.mysql.jdbc.Driver > >> Name: <any name you want here, defaults: MySQL (Connector/J > driver)> > >> > >> This will NOT work with 8.0.11! > >> > >> Using Legacy mode, use the following: > >> Driver: C:\Program > >> Files\Java\jdk1.8.0_162\db\lib\mysql-connector-java-5.1.46.jar > >> Driver class: com.mysql.jdbc.Driver (Same calling method) > >> Name: <any name you want here, I changed it to: MySQL > >> (Connector/J driver) 5.1.46> > >> > >> This works using NB. See attached. I downloaded the above driver, > >> search for it. > >> > >> I will next change the authentication method to the Strong Password > >> Encryption and use the following configuration. I will also test it > >> with the legacy authentication to just see it fail. > >> > >> mysql-connector-java-8.0.11.jar > >> > >> It is installed in: C:\Program Files (x86)\MySQL\Connector J 8.0 > >> But this requires either a selective installation of mySQL using their > >> installer, just don't accept the default method to customize it. I > >> selected the components to install and selected the connector. > >> > >> The connector is also available at: > >> https://dev.mysql.com/downloads/connector/j/5.0.html > >> > >> > >> phpMyAdmin from version 1.42 and higher supports the administration of > >> multiple MySQL servers. I am attaching one I am usings as an example. > >> I am using XAMPP on Windows here. > >> > >> The file is located in: C:\xampp\phpMyAdmin\ > >> > >> The filename is config.inc.php. I changed the name because I hard > >> coded the admin account and password. There is probably a method to > >> prompt for the name. I did not have time to set it up or try it. > >> > >> > >> Regards, > >> > >> Efrem McCrimon > >> GUI Builder Tribe > >> DB Tribe > >> > >> > >> > >> On Wed, Apr 25, 2018 at 6:04 PM, Martin O'Shea < > martin_os...@outlook.com> wrote: > >>> Paul > >>> > >>> > >>> > >>> I have just run MySQL_Upgrade as you suggested, and have restarted > MySQL and > >>> NetBeans. But unfortunately, the result is the same as before. > >>> > >>> > >>> > >>> Yet I know that table 'mysql.plugin' does exist. > >>> > >>> > >>> > >>> Any ideas? > >>> > >>> > >>> > >>> Thanks > >>> > >>> > >>> > >>> Martin O’Shea. > >>> > >>> > > > > > > > > > > >