Ask Your Question
1

ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' [closed]

asked 2015-03-09 05:30:05 -0500

Pradip gravatar image

Hello,

I am getting this error in ./stack.sh. Any help is highly appreciated.

2015-03-09 10:26:51.819 | + sudo mysql -uroot '-pnetapp1!' -h127.0.0.1 -e 'GRANT ALL PRIVILEGES ON *.* TO '\''root'\''@'\''%'\'' identified by '\''netapp1!'\'';'
2015-03-09 10:26:51.849 | ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (111)
2015-03-09 10:26:51.850 | + exit_trap
2015-03-09 10:26:51.850 | + local r=1
2015-03-09 10:26:51.850 | ++ jobs -p
2015-03-09 10:26:51.851 | + jobs=
2015-03-09 10:26:51.851 | + [[ -n '' ]]
2015-03-09 10:26:51.851 | + kill_spinner
2015-03-09 10:26:51.851 | + '[' '!' -z '' ']'
2015-03-09 10:26:51.851 | + [[ 1 -ne 0 ]]
2015-03-09 10:26:51.852 | + echo 'Error on exit'
2015-03-09 10:26:51.852 | Error on exit
2015-03-09 10:26:51.852 | + [[ -z /opt/stack ]]
2015-03-09 10:26:51.852 | + /opt/stack/devstack/tools/worlddump.py -d /opt/stack
2015-03-09 10:26:51.907 | + exit 1

Thanks, Pradip

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Pradip
close date 2015-03-24 08:20:38.165951

2 answers

Sort by ยป oldest newest most voted
0

answered 2015-03-09 06:16:31 -0500

updated 2015-03-09 06:18:24 -0500

hey there,

mysql must be binded to an IP address if you want to bind it for localhost 127.0.0.1 then its is fine.

provided in localrc.conf the same IP must reflect.

my usual practise is will make one IP static in /etc/network/interfaces and provide that IP to localrc.conf

edit flag offensive delete link more

Comments

Hi, Here is the setup in local.conf:

ADMIN_PASSWORD=<change-it> DATABASE_PASSWORD=$ADMIN_PASSWORD MYSQL_HOST=127.0.0.1 MYSQL_USER=root MYSQL_PASSWORD=$ADMIN_PASSWORD

Pradip gravatar imagePradip ( 2015-03-09 06:20:58 -0500 )edit

I tried with Ubuntu14.04 also. The same. What I am missing here?

Pradip gravatar imagePradip ( 2015-03-09 09:29:57 -0500 )edit
0

answered 2015-03-24 08:20:24 -0500

Pradip gravatar image

I have made the MYSQL_USER as admin (initially it was root), and it builds well. It worked! But don't know why it did not work for root. So the change is: MYSQL_USER=admin

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2015-03-09 05:30:05 -0500

Seen: 3,500 times

Last updated: Mar 24 '15