MySql on Centos 7.2MySQL socket connections working, but not port connectionsInstalling MySQL 5.1 on Mac OS X...
How to write a macro that is braces sensitive?
Do I have a twin with permutated remainders?
What are these boxed doors outside store fronts in New York?
Mathematical cryptic clues
How did the USSR manage to innovate in an environment characterized by government censorship and high bureaucracy?
What do the dots in this tr command do: tr .............A-Z A-ZA-Z <<< "JVPQBOV" (with 13 dots)
What typically incentivizes a professor to change jobs to a lower ranking university?
Modeling an IPv4 Address
What does it mean to describe someone as a butt steak?
Can I make popcorn with any corn?
Minkowski space
Is it tax fraud for an individual to declare non-taxable revenue as taxable income? (US tax laws)
How to find program name(s) of an installed package?
Can I ask the recruiters in my resume to put the reason why I am rejected?
Can divisibility rules for digits be generalized to sum of digits
If I cast Expeditious Retreat, can I Dash as a bonus action on the same turn?
What do you call a Matrix-like slowdown and camera movement effect?
TGV timetables / schedules?
What is the word for reserving something for yourself before others do?
Why dont electromagnetic waves interact with each other?
How does strength of boric acid solution increase in presence of salicylic acid?
Why not use SQL instead of GraphQL?
Why do falling prices hurt debtors?
How do I create uniquely male characters?
MySql on Centos 7.2
MySQL socket connections working, but not port connectionsInstalling MySQL 5.1 on Mac OS X 10.7 (Lion)MySQL ERROR 2002 (HY000) on CentOS 5How to access MySQL when I delete the root user on openSUSE 11?Reinstalling Mysql On Ubuntu 10.10(Stuck with bad repositories)How to completely shut MySQL server down on Ubuntu serverFully resetting MySQLUnable to move MySQL data to external drivemySQL how to fix user after I mistakenly added localhost to user instead of 127.0.0.1Encountering password error in re-installing MYSQL server
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
I have an issue with my MySql 5.7 version on my CentOS 7.2 instance
I installed MySql via the binaries.
groupadd mysql
useradd -r -g mysql -s /bin/false mysql
cd /usr/local
tar zxvf /path/to/mysql-VERSION-OS.tar.gz
ln -s full-path-to-mysql-VERSION-OS mysql
cd mysql
mkdir mysql-files
chown mysql:mysql mysql-files
chmod 750 mysql-files
bin/mysqld --initialize --user=mysql ( it will generate password for root user)
bin/mysqld --user=mysql ( It will start the mysql)
- Open another Session of Mysql . Go to /usr/local/mysql then enter root password recorded earlier
/usr/local/bin/mysql -u root -p -h 127.0.0.1
- After mysql Installation, I create a database "databaseDB"
ALTER USER 'root'@'localhost' IDENTIFIED BY 'xxxxx’;
CREATE USER mysql;
SET PASSWORD FOR mysql = PASSWORD ('yyyyy');
create database databaseDB DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
grant all on databaseDB.* to mysql@'%';
grant all on looker_tmp.* to mysql@'%';
flush privileges;
exit;
However, when I try to connect to the database as the root user:
/usr/local/mysql/bin/mysql -u root -p
or the mysql user:
/usr/local/mysql/bin/mysql -u mysql -p
I get the following socket error:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
I verified that the database is running:
[root@looker-mysql-automation-484606751-1-524514057 ~]# ps aux | grep mysql
root 18778 0.0 0.0 110528 12828 ? Ss 02:47 0:00 /sbin/dhclient -H looker-mysql-automation-484606751-1-524514057 -q -lf /var/lib/dhclient/dhclient--eth0.lease -pf /var/run/dhclient-eth0.pid eth0
mysql 80767 0.0 0.6 1183088 184448 pts/0 Sl+ 13:21 0:04 /usr/local/mysql/bin/mysqld --user=mysql
root 87503 0.0 0.0 112652 972 pts/3 S+ 15:24 0:00 grep --color=auto mysql
I can connect to the database using:
/usr/local/mysql/bin/mysql -u root -p -h 127.0.0.1
Any thoughts? Thank you
mysql centos-7
New contributor
|
show 6 more comments
I have an issue with my MySql 5.7 version on my CentOS 7.2 instance
I installed MySql via the binaries.
groupadd mysql
useradd -r -g mysql -s /bin/false mysql
cd /usr/local
tar zxvf /path/to/mysql-VERSION-OS.tar.gz
ln -s full-path-to-mysql-VERSION-OS mysql
cd mysql
mkdir mysql-files
chown mysql:mysql mysql-files
chmod 750 mysql-files
bin/mysqld --initialize --user=mysql ( it will generate password for root user)
bin/mysqld --user=mysql ( It will start the mysql)
- Open another Session of Mysql . Go to /usr/local/mysql then enter root password recorded earlier
/usr/local/bin/mysql -u root -p -h 127.0.0.1
- After mysql Installation, I create a database "databaseDB"
ALTER USER 'root'@'localhost' IDENTIFIED BY 'xxxxx’;
CREATE USER mysql;
SET PASSWORD FOR mysql = PASSWORD ('yyyyy');
create database databaseDB DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
grant all on databaseDB.* to mysql@'%';
grant all on looker_tmp.* to mysql@'%';
flush privileges;
exit;
However, when I try to connect to the database as the root user:
/usr/local/mysql/bin/mysql -u root -p
or the mysql user:
/usr/local/mysql/bin/mysql -u mysql -p
I get the following socket error:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
I verified that the database is running:
[root@looker-mysql-automation-484606751-1-524514057 ~]# ps aux | grep mysql
root 18778 0.0 0.0 110528 12828 ? Ss 02:47 0:00 /sbin/dhclient -H looker-mysql-automation-484606751-1-524514057 -q -lf /var/lib/dhclient/dhclient--eth0.lease -pf /var/run/dhclient-eth0.pid eth0
mysql 80767 0.0 0.6 1183088 184448 pts/0 Sl+ 13:21 0:04 /usr/local/mysql/bin/mysqld --user=mysql
root 87503 0.0 0.0 112652 972 pts/3 S+ 15:24 0:00 grep --color=auto mysql
I can connect to the database using:
/usr/local/mysql/bin/mysql -u root -p -h 127.0.0.1
Any thoughts? Thank you
mysql centos-7
New contributor
Please add the command(s) you are trying that produce the error message: "ERROR 2002 (HY000): Can't connect to local MySQL server..." It may be useful to know what you are doing.
– ender.qa
yesterday
When I try to connect as the root user
– user2872898
yesterday
When I try to connect as the root user
– user2872898
yesterday
added mysql commands that causes the socket error
– user2872898
yesterday
It looks like you can connect when you add the option-h 127.0.0.1
, is that correct? May I inquire: what's 'bad' about having to add the '-h' option?
– ender.qa
yesterday
|
show 6 more comments
I have an issue with my MySql 5.7 version on my CentOS 7.2 instance
I installed MySql via the binaries.
groupadd mysql
useradd -r -g mysql -s /bin/false mysql
cd /usr/local
tar zxvf /path/to/mysql-VERSION-OS.tar.gz
ln -s full-path-to-mysql-VERSION-OS mysql
cd mysql
mkdir mysql-files
chown mysql:mysql mysql-files
chmod 750 mysql-files
bin/mysqld --initialize --user=mysql ( it will generate password for root user)
bin/mysqld --user=mysql ( It will start the mysql)
- Open another Session of Mysql . Go to /usr/local/mysql then enter root password recorded earlier
/usr/local/bin/mysql -u root -p -h 127.0.0.1
- After mysql Installation, I create a database "databaseDB"
ALTER USER 'root'@'localhost' IDENTIFIED BY 'xxxxx’;
CREATE USER mysql;
SET PASSWORD FOR mysql = PASSWORD ('yyyyy');
create database databaseDB DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
grant all on databaseDB.* to mysql@'%';
grant all on looker_tmp.* to mysql@'%';
flush privileges;
exit;
However, when I try to connect to the database as the root user:
/usr/local/mysql/bin/mysql -u root -p
or the mysql user:
/usr/local/mysql/bin/mysql -u mysql -p
I get the following socket error:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
I verified that the database is running:
[root@looker-mysql-automation-484606751-1-524514057 ~]# ps aux | grep mysql
root 18778 0.0 0.0 110528 12828 ? Ss 02:47 0:00 /sbin/dhclient -H looker-mysql-automation-484606751-1-524514057 -q -lf /var/lib/dhclient/dhclient--eth0.lease -pf /var/run/dhclient-eth0.pid eth0
mysql 80767 0.0 0.6 1183088 184448 pts/0 Sl+ 13:21 0:04 /usr/local/mysql/bin/mysqld --user=mysql
root 87503 0.0 0.0 112652 972 pts/3 S+ 15:24 0:00 grep --color=auto mysql
I can connect to the database using:
/usr/local/mysql/bin/mysql -u root -p -h 127.0.0.1
Any thoughts? Thank you
mysql centos-7
New contributor
I have an issue with my MySql 5.7 version on my CentOS 7.2 instance
I installed MySql via the binaries.
groupadd mysql
useradd -r -g mysql -s /bin/false mysql
cd /usr/local
tar zxvf /path/to/mysql-VERSION-OS.tar.gz
ln -s full-path-to-mysql-VERSION-OS mysql
cd mysql
mkdir mysql-files
chown mysql:mysql mysql-files
chmod 750 mysql-files
bin/mysqld --initialize --user=mysql ( it will generate password for root user)
bin/mysqld --user=mysql ( It will start the mysql)
- Open another Session of Mysql . Go to /usr/local/mysql then enter root password recorded earlier
/usr/local/bin/mysql -u root -p -h 127.0.0.1
- After mysql Installation, I create a database "databaseDB"
ALTER USER 'root'@'localhost' IDENTIFIED BY 'xxxxx’;
CREATE USER mysql;
SET PASSWORD FOR mysql = PASSWORD ('yyyyy');
create database databaseDB DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
grant all on databaseDB.* to mysql@'%';
grant all on looker_tmp.* to mysql@'%';
flush privileges;
exit;
However, when I try to connect to the database as the root user:
/usr/local/mysql/bin/mysql -u root -p
or the mysql user:
/usr/local/mysql/bin/mysql -u mysql -p
I get the following socket error:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
I verified that the database is running:
[root@looker-mysql-automation-484606751-1-524514057 ~]# ps aux | grep mysql
root 18778 0.0 0.0 110528 12828 ? Ss 02:47 0:00 /sbin/dhclient -H looker-mysql-automation-484606751-1-524514057 -q -lf /var/lib/dhclient/dhclient--eth0.lease -pf /var/run/dhclient-eth0.pid eth0
mysql 80767 0.0 0.6 1183088 184448 pts/0 Sl+ 13:21 0:04 /usr/local/mysql/bin/mysqld --user=mysql
root 87503 0.0 0.0 112652 972 pts/3 S+ 15:24 0:00 grep --color=auto mysql
I can connect to the database using:
/usr/local/mysql/bin/mysql -u root -p -h 127.0.0.1
Any thoughts? Thank you
mysql centos-7
mysql centos-7
New contributor
New contributor
edited yesterday
user2872898
New contributor
asked yesterday
user2872898user2872898
11
11
New contributor
New contributor
Please add the command(s) you are trying that produce the error message: "ERROR 2002 (HY000): Can't connect to local MySQL server..." It may be useful to know what you are doing.
– ender.qa
yesterday
When I try to connect as the root user
– user2872898
yesterday
When I try to connect as the root user
– user2872898
yesterday
added mysql commands that causes the socket error
– user2872898
yesterday
It looks like you can connect when you add the option-h 127.0.0.1
, is that correct? May I inquire: what's 'bad' about having to add the '-h' option?
– ender.qa
yesterday
|
show 6 more comments
Please add the command(s) you are trying that produce the error message: "ERROR 2002 (HY000): Can't connect to local MySQL server..." It may be useful to know what you are doing.
– ender.qa
yesterday
When I try to connect as the root user
– user2872898
yesterday
When I try to connect as the root user
– user2872898
yesterday
added mysql commands that causes the socket error
– user2872898
yesterday
It looks like you can connect when you add the option-h 127.0.0.1
, is that correct? May I inquire: what's 'bad' about having to add the '-h' option?
– ender.qa
yesterday
Please add the command(s) you are trying that produce the error message: "ERROR 2002 (HY000): Can't connect to local MySQL server..." It may be useful to know what you are doing.
– ender.qa
yesterday
Please add the command(s) you are trying that produce the error message: "ERROR 2002 (HY000): Can't connect to local MySQL server..." It may be useful to know what you are doing.
– ender.qa
yesterday
When I try to connect as the root user
– user2872898
yesterday
When I try to connect as the root user
– user2872898
yesterday
When I try to connect as the root user
– user2872898
yesterday
When I try to connect as the root user
– user2872898
yesterday
added mysql commands that causes the socket error
– user2872898
yesterday
added mysql commands that causes the socket error
– user2872898
yesterday
It looks like you can connect when you add the option
-h 127.0.0.1
, is that correct? May I inquire: what's 'bad' about having to add the '-h' option?– ender.qa
yesterday
It looks like you can connect when you add the option
-h 127.0.0.1
, is that correct? May I inquire: what's 'bad' about having to add the '-h' option?– ender.qa
yesterday
|
show 6 more comments
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
user2872898 is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1421935%2fmysql-on-centos-7-2%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
user2872898 is a new contributor. Be nice, and check out our Code of Conduct.
user2872898 is a new contributor. Be nice, and check out our Code of Conduct.
user2872898 is a new contributor. Be nice, and check out our Code of Conduct.
user2872898 is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1421935%2fmysql-on-centos-7-2%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Please add the command(s) you are trying that produce the error message: "ERROR 2002 (HY000): Can't connect to local MySQL server..." It may be useful to know what you are doing.
– ender.qa
yesterday
When I try to connect as the root user
– user2872898
yesterday
When I try to connect as the root user
– user2872898
yesterday
added mysql commands that causes the socket error
– user2872898
yesterday
It looks like you can connect when you add the option
-h 127.0.0.1
, is that correct? May I inquire: what's 'bad' about having to add the '-h' option?– ender.qa
yesterday