Re: Problem w/ MySQL57 install

2016-07-25 Thread Bradley Giesbrecht
> On Jul 25, 2016, at 8:02 PM, Bill Christensen  
> wrote:
> 
> > On Jul 25, 2016, at 12:04 AM, Bill Christensen 
> >  wrote:
> 
> >
> > When I load MySQL and try to connect I get
> >
> >  Can't connect to local MySQL server through socket 
> > '/opt/local/var/run/mysql57/mysqld.sock' (2)
> 
> On Mon, Jul 25, 2016 at 4:57 PM, Bradley Giesbrecht  
> wrote: 
> 
> If the mysql.sock file does not exist and mysql57 is running
> 
> Just to be clear:  I run 
> 
>  ps -ax | grep mysql
> 
> and get only 
> 
>  751 ttys0160:00.01 grep mysql
> 
> which appears to me to indicate that mysql is NOT running.  Correct?   

Yes, mysql is not running.

You could try running mysqld directly to see if it gives any clues as to what 
the problem is:

sudo /opt/local/lib/mysql57/bin/mysqld --user=_mysql


Regards,
Bradley Giesbrecht (pixilla)


___
macports-users mailing list
macports-users@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-users


Re: Problem w/ MySQL57 install

2016-07-25 Thread Bill Christensen
> On Jul 25, 2016, at 12:04 AM, Bill Christensen <
> billc_li...@greenbuilder.com> wrote:
>
> >
> > When I load MySQL and try to connect I get
> >
> >  Can't connect to local MySQL server through socket
> '/opt/local/var/run/mysql57/mysqld.sock' (2)
>

On Mon, Jul 25, 2016 at 4:57 PM, Bradley Giesbrecht 
 wrote:

>
> If the mysql.sock file does not exist and mysql57 is running


Just to be clear:  I run

 ps -ax | grep mysql

and get only

 751 ttys0160:00.01 grep mysql

which appears to me to indicate that mysql is NOT running.  Correct?


> then there is likely a my.cnf options file in one of the paths that mysql
> searches.
>
> http://dev.mysql.com/doc/refman/5.7/en/option-files.html
>
> Rename or delete the options file if found.
>

Checked those, renamed.  still no joy.

>
>
> —
> Brad
___
macports-users mailing list
macports-users@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-users


Re: Problem w/ MySQL57 install

2016-07-25 Thread Bradley Giesbrecht
> On Jul 25, 2016, at 12:04 AM, Bill Christensen  
> wrote:
> 
> Hi folks,
> 
> in the instructions at https://trac.macports.org/wiki/howto/MySQL (written to 
> MySQL56, though I'm using the same instructions to install MySQL57 instead), 
> it says to run
> 
>   sudo -u _mysql mysql_install_db
> 
> Doing so for MySQL57 gives the message:
> 
>  [WARNING] mysql_install_db is deprecated. Please consider switching to 
> mysqld --initialize
> 
> I tried
> 
> sudo -u _mysql mysqld --initialize
> 
> but that gave me 
> 
> [ERROR] --initialize specified but the data directory has files in it. 
> Aborting.
> 
> which appears to be true Is there a different command I should be using, 
> or are there some missing options which need to be specified?
> 
> When I load MySQL and try to connect I get
> 
>  Can't connect to local MySQL server through socket 
> '/opt/local/var/run/mysql57/mysqld.sock' (2)

If the mysql.sock file does not exist and mysql57 is running then there is 
likely a my.cnf options file in one of the paths that mysql searches.

http://dev.mysql.com/doc/refman/5.7/en/option-files.html

Rename or delete the options file if found.


—
Brad
___
macports-users mailing list
macports-users@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-users


Re: Problem w/ MySQL57 install

2016-07-25 Thread Bill Christensen
> On Jul 25, 2016, at 12:04 AM, Bill Christensen <
> billc_li...@greenbuilder.com> wrote:
> >
> >
> > When I load MySQL and try to connect I get
> >
> >  Can't connect to local MySQL server through socket
> '/opt/local/var/run/mysql57/mysqld.sock' (2)
> >
> > Any hints on where I'm going wrong?
>
>
On Mon, Jul 25, 2016 at 1:18 PM, Bradley Giesbrecht 
 wrote:


> Did you install the mysql57-server port?
>
> sudo port install mysql57-server
> sudo port load mysql57-server
>
>
Yes.
___
macports-users mailing list
macports-users@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-users


Re: Problem w/ MySQL57 install

2016-07-25 Thread Bill Christensen
On Mon, Jul 25, 2016 at 12:57 PM, Ryan Schmidt 
wrote:

>
> > On Jul 25, 2016, at 2:04 AM, Bill Christensen <
> billc_li...@greenbuilder.com> wrote:
> >
> > Hi folks,
> >
> > in the instructions at https://trac.macports.org/wiki/howto/MySQL
> (written to MySQL56, though I'm using the same instructions to install
> MySQL57 instead), it says to run
> >
> >   sudo -u _mysql mysql_install_db
> >
> > Doing so for MySQL57 gives the message:
> >
> >  [WARNING] mysql_install_db is deprecated. Please consider switching
> to mysqld --initialize
> >
> > I tried
> >
> > sudo -u _mysql mysqld --initialize
> >
> > but that gave me
> >
> > [ERROR] --initialize specified but the data directory has files in
> it. Aborting.
> >
> > which appears to be true Is there a different command I should be
> using, or are there some missing options which need to be specified?
>
> Did you check https://trac.macports.org/wiki/howto/MySQL#mysql_upgrade ?
>
>
No, I hadn't, as the db install is new and I was following the instructions
from the top down.  I hadn't gotten that far yet.

running
 sudo /opt/local/lib/mysql56/bin/mysql_upgrade -u root -p
results in
Got error: 2002: Can't connect to local MySQL server through socket
'/opt/local/var/run/mysql57/mysqld.sock' (2) while connecting to the MySQL
server
___
macports-users mailing list
macports-users@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-users


Re: Problem w/ MySQL57 install

2016-07-25 Thread Bradley Giesbrecht
> On Jul 25, 2016, at 12:04 AM, Bill Christensen  
> wrote:
> 
> Hi folks,
> 
> in the instructions at https://trac.macports.org/wiki/howto/MySQL (written to 
> MySQL56, though I'm using the same instructions to install MySQL57 instead), 
> it says to run
> 
>   sudo -u _mysql mysql_install_db
> 
> Doing so for MySQL57 gives the message:
> 
>  [WARNING] mysql_install_db is deprecated. Please consider switching to 
> mysqld —initialize

Since this is warning and not an error this command likely did what you wanted.

> I tried
> 
> sudo -u _mysql mysqld --initialize
> 
> but that gave me 
> 
> [ERROR] --initialize specified but the data directory has files in it. 
> Aborting.
> 
> which appears to be true Is there a different command I should be using, 
> or are there some missing options which need to be specified?
> 
> When I load MySQL and try to connect I get
> 
>  Can't connect to local MySQL server through socket 
> '/opt/local/var/run/mysql57/mysqld.sock' (2)
> 
> Any hints on where I'm going wrong?

Did you install the mysql57-server port?

sudo port install mysql57-server
sudo port load mysql57-server


Regards,
Bradley Giesbrecht (pixilla)




___
macports-users mailing list
macports-users@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-users


Re: Problem w/ MySQL57 install

2016-07-25 Thread Ryan Schmidt

> On Jul 25, 2016, at 2:04 AM, Bill Christensen  
> wrote:
> 
> Hi folks,
> 
> in the instructions at https://trac.macports.org/wiki/howto/MySQL (written to 
> MySQL56, though I'm using the same instructions to install MySQL57 instead), 
> it says to run
> 
>   sudo -u _mysql mysql_install_db
> 
> Doing so for MySQL57 gives the message:
> 
>  [WARNING] mysql_install_db is deprecated. Please consider switching to 
> mysqld --initialize
> 
> I tried
> 
> sudo -u _mysql mysqld --initialize
> 
> but that gave me 
> 
> [ERROR] --initialize specified but the data directory has files in it. 
> Aborting.
> 
> which appears to be true Is there a different command I should be using, 
> or are there some missing options which need to be specified?

Did you check https://trac.macports.org/wiki/howto/MySQL#mysql_upgrade ?


> When I load MySQL and try to connect I get
> 
>  Can't connect to local MySQL server through socket 
> '/opt/local/var/run/mysql57/mysqld.sock' (2)
> 
> Any hints on where I'm going wrong?

That sounds like the server did not start. The log file might say why.

___
macports-users mailing list
macports-users@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-users