Mysql.sock missing - “Can't connect to local MySQL server through socket”





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















Operating System - OSX 10.11.2



MAMP version - 3.5





I'm following along with this guide, setting up wordpress with Xammp on PC and MAMP on Mac, where I'm in step "Mac - 4" is asked to input:



"In the Terminal run: /Applications/MAMP/Library/bin/mysqladmin -u root -p password {Your Windows MySQL password here}"



However, this (with out bracket text) results in error message:



error: 'Can't connect to local MySQL server through socket '/Applications/MAMP/tmp/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/Applications/MAMP/tmp/mysql/mysql.sock' exists!


Looking into given directory directory there are no mysql.sock file.



Trying to start MAMP anyway (without configuring mysqladmin) results in error log:



160113 20:42:10 mysqld_safe Starting mysqld daemon with databases from /Applications/MAMP/db/mysql
160113 20:42:10 [Warning] Setting lower_case_table_names=2 because file system for /Applications/MAMP/db/mysql/ is case insensitive
160113 20:42:10 [Note] Plugin 'FEDERATED' is disabled.
160113 20:42:10 InnoDB: The InnoDB memory heap is disabled
160113 20:42:10 InnoDB: Mutexes and rw_locks use GCC atomic builtins
160113 20:42:10 InnoDB: Compressed tables use zlib 1.2.3
160113 20:42:10 InnoDB: Initializing buffer pool, size = 128.0M
160113 20:42:10 InnoDB: Completed initialization of buffer pool
160113 20:42:10 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
160113 20:42:10 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
160113 20:42:10 InnoDB: Waiting for the background threads to start
160113 20:42:11 InnoDB: 5.5.42 started; log sequence number 139375528
160113 20:42:11 InnoDB: Warning: table 'wordpress/wp_posts'
InnoDB: in InnoDB data dictionary has unknown flags 50.
160113 20:42:11 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
160113 20:42:11 InnoDB: Warning: table 'wordpress/wp_postm160113 20:42:11 [Note] - '0.0.0.0' resolves to '0.0.0.0';
eta'
InnoDB: in InnoDB data dictionary has unknown flags 50.
160113 20:42:11 [Note] Server socket created on IP: '0.0.0.0'.
160113 20:42:11 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
160113 20:42:11 mysqld_safe mysqld from pid file /Applications/MAMP/tmp/mysql/mysql.pid ended









share|improve this question

























  • Possible duplicate of Can't open and lock privilege tables: Table 'mysql.host' doesn't exist

    – kenorb
    Jan 13 '16 at 19:51











  • Check also: Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist at SO

    – kenorb
    Jan 13 '16 at 19:53


















0















Operating System - OSX 10.11.2



MAMP version - 3.5





I'm following along with this guide, setting up wordpress with Xammp on PC and MAMP on Mac, where I'm in step "Mac - 4" is asked to input:



"In the Terminal run: /Applications/MAMP/Library/bin/mysqladmin -u root -p password {Your Windows MySQL password here}"



However, this (with out bracket text) results in error message:



error: 'Can't connect to local MySQL server through socket '/Applications/MAMP/tmp/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/Applications/MAMP/tmp/mysql/mysql.sock' exists!


Looking into given directory directory there are no mysql.sock file.



Trying to start MAMP anyway (without configuring mysqladmin) results in error log:



160113 20:42:10 mysqld_safe Starting mysqld daemon with databases from /Applications/MAMP/db/mysql
160113 20:42:10 [Warning] Setting lower_case_table_names=2 because file system for /Applications/MAMP/db/mysql/ is case insensitive
160113 20:42:10 [Note] Plugin 'FEDERATED' is disabled.
160113 20:42:10 InnoDB: The InnoDB memory heap is disabled
160113 20:42:10 InnoDB: Mutexes and rw_locks use GCC atomic builtins
160113 20:42:10 InnoDB: Compressed tables use zlib 1.2.3
160113 20:42:10 InnoDB: Initializing buffer pool, size = 128.0M
160113 20:42:10 InnoDB: Completed initialization of buffer pool
160113 20:42:10 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
160113 20:42:10 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
160113 20:42:10 InnoDB: Waiting for the background threads to start
160113 20:42:11 InnoDB: 5.5.42 started; log sequence number 139375528
160113 20:42:11 InnoDB: Warning: table 'wordpress/wp_posts'
InnoDB: in InnoDB data dictionary has unknown flags 50.
160113 20:42:11 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
160113 20:42:11 InnoDB: Warning: table 'wordpress/wp_postm160113 20:42:11 [Note] - '0.0.0.0' resolves to '0.0.0.0';
eta'
InnoDB: in InnoDB data dictionary has unknown flags 50.
160113 20:42:11 [Note] Server socket created on IP: '0.0.0.0'.
160113 20:42:11 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
160113 20:42:11 mysqld_safe mysqld from pid file /Applications/MAMP/tmp/mysql/mysql.pid ended









share|improve this question

























  • Possible duplicate of Can't open and lock privilege tables: Table 'mysql.host' doesn't exist

    – kenorb
    Jan 13 '16 at 19:51











  • Check also: Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist at SO

    – kenorb
    Jan 13 '16 at 19:53














0












0








0








Operating System - OSX 10.11.2



MAMP version - 3.5





I'm following along with this guide, setting up wordpress with Xammp on PC and MAMP on Mac, where I'm in step "Mac - 4" is asked to input:



"In the Terminal run: /Applications/MAMP/Library/bin/mysqladmin -u root -p password {Your Windows MySQL password here}"



However, this (with out bracket text) results in error message:



error: 'Can't connect to local MySQL server through socket '/Applications/MAMP/tmp/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/Applications/MAMP/tmp/mysql/mysql.sock' exists!


Looking into given directory directory there are no mysql.sock file.



Trying to start MAMP anyway (without configuring mysqladmin) results in error log:



160113 20:42:10 mysqld_safe Starting mysqld daemon with databases from /Applications/MAMP/db/mysql
160113 20:42:10 [Warning] Setting lower_case_table_names=2 because file system for /Applications/MAMP/db/mysql/ is case insensitive
160113 20:42:10 [Note] Plugin 'FEDERATED' is disabled.
160113 20:42:10 InnoDB: The InnoDB memory heap is disabled
160113 20:42:10 InnoDB: Mutexes and rw_locks use GCC atomic builtins
160113 20:42:10 InnoDB: Compressed tables use zlib 1.2.3
160113 20:42:10 InnoDB: Initializing buffer pool, size = 128.0M
160113 20:42:10 InnoDB: Completed initialization of buffer pool
160113 20:42:10 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
160113 20:42:10 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
160113 20:42:10 InnoDB: Waiting for the background threads to start
160113 20:42:11 InnoDB: 5.5.42 started; log sequence number 139375528
160113 20:42:11 InnoDB: Warning: table 'wordpress/wp_posts'
InnoDB: in InnoDB data dictionary has unknown flags 50.
160113 20:42:11 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
160113 20:42:11 InnoDB: Warning: table 'wordpress/wp_postm160113 20:42:11 [Note] - '0.0.0.0' resolves to '0.0.0.0';
eta'
InnoDB: in InnoDB data dictionary has unknown flags 50.
160113 20:42:11 [Note] Server socket created on IP: '0.0.0.0'.
160113 20:42:11 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
160113 20:42:11 mysqld_safe mysqld from pid file /Applications/MAMP/tmp/mysql/mysql.pid ended









share|improve this question
















Operating System - OSX 10.11.2



MAMP version - 3.5





I'm following along with this guide, setting up wordpress with Xammp on PC and MAMP on Mac, where I'm in step "Mac - 4" is asked to input:



"In the Terminal run: /Applications/MAMP/Library/bin/mysqladmin -u root -p password {Your Windows MySQL password here}"



However, this (with out bracket text) results in error message:



error: 'Can't connect to local MySQL server through socket '/Applications/MAMP/tmp/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/Applications/MAMP/tmp/mysql/mysql.sock' exists!


Looking into given directory directory there are no mysql.sock file.



Trying to start MAMP anyway (without configuring mysqladmin) results in error log:



160113 20:42:10 mysqld_safe Starting mysqld daemon with databases from /Applications/MAMP/db/mysql
160113 20:42:10 [Warning] Setting lower_case_table_names=2 because file system for /Applications/MAMP/db/mysql/ is case insensitive
160113 20:42:10 [Note] Plugin 'FEDERATED' is disabled.
160113 20:42:10 InnoDB: The InnoDB memory heap is disabled
160113 20:42:10 InnoDB: Mutexes and rw_locks use GCC atomic builtins
160113 20:42:10 InnoDB: Compressed tables use zlib 1.2.3
160113 20:42:10 InnoDB: Initializing buffer pool, size = 128.0M
160113 20:42:10 InnoDB: Completed initialization of buffer pool
160113 20:42:10 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
160113 20:42:10 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
160113 20:42:10 InnoDB: Waiting for the background threads to start
160113 20:42:11 InnoDB: 5.5.42 started; log sequence number 139375528
160113 20:42:11 InnoDB: Warning: table 'wordpress/wp_posts'
InnoDB: in InnoDB data dictionary has unknown flags 50.
160113 20:42:11 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
160113 20:42:11 InnoDB: Warning: table 'wordpress/wp_postm160113 20:42:11 [Note] - '0.0.0.0' resolves to '0.0.0.0';
eta'
InnoDB: in InnoDB data dictionary has unknown flags 50.
160113 20:42:11 [Note] Server socket created on IP: '0.0.0.0'.
160113 20:42:11 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
160113 20:42:11 mysqld_safe mysqld from pid file /Applications/MAMP/tmp/mysql/mysql.pid ended






macos mac mysql






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 13 '16 at 20:49







user3789629

















asked Jan 13 '16 at 19:45









user3789629user3789629

612




612













  • Possible duplicate of Can't open and lock privilege tables: Table 'mysql.host' doesn't exist

    – kenorb
    Jan 13 '16 at 19:51











  • Check also: Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist at SO

    – kenorb
    Jan 13 '16 at 19:53



















  • Possible duplicate of Can't open and lock privilege tables: Table 'mysql.host' doesn't exist

    – kenorb
    Jan 13 '16 at 19:51











  • Check also: Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist at SO

    – kenorb
    Jan 13 '16 at 19:53

















Possible duplicate of Can't open and lock privilege tables: Table 'mysql.host' doesn't exist

– kenorb
Jan 13 '16 at 19:51





Possible duplicate of Can't open and lock privilege tables: Table 'mysql.host' doesn't exist

– kenorb
Jan 13 '16 at 19:51













Check also: Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist at SO

– kenorb
Jan 13 '16 at 19:53





Check also: Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist at SO

– kenorb
Jan 13 '16 at 19:53










1 Answer
1






active

oldest

votes


















0














According to Troubleshooting a MySQL Installation Reference Manual (it's for Windows, but it should be the same for other systems), the error:




Fatal error: Can't open privilege tables: Table 'mysql.host' doesn't exist




can occur when the MySQL base or data directories are installed in different locations. This could happen when you upgraded and installed to a new location, but you're using old configuration file. If that's the case, be sure to rename any old configuration files when upgrading MySQL.



Otherwise please edit your my.ini and double check that basedir and datadir (in [mysqld] section) are pointing to the right location.



If they're correct, try recreating MySQL core structure using the following command:



sudo mysql_install_db –-user=mysql –ldata=/YOUR/datadir


If above won't help, please re-install your MAMP/mysql from scratch.






share|improve this answer


























  • I reinstalled MAMP. Works fine with default mysql-folder. Now, trying to enter: /Applications/MAMP/Library/bin/mysqladmin -u root -p password in terminal results in: "error: 'Can't connect to local MySQL server through socket ...'

    – user3789629
    Jan 13 '16 at 20:54













  • @user3789629 Check by mysql_config --socket where is your socket file and if it's correct (/Applications/MAMP/tmp/mysql/mysql.sock), otherwise update it in your my.cnf. See this post, it's Drupal focused, but still could help.

    – kenorb
    Jan 13 '16 at 21:01














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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1025972%2fmysql-sock-missing-cant-connect-to-local-mysql-server-through-socket%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














According to Troubleshooting a MySQL Installation Reference Manual (it's for Windows, but it should be the same for other systems), the error:




Fatal error: Can't open privilege tables: Table 'mysql.host' doesn't exist




can occur when the MySQL base or data directories are installed in different locations. This could happen when you upgraded and installed to a new location, but you're using old configuration file. If that's the case, be sure to rename any old configuration files when upgrading MySQL.



Otherwise please edit your my.ini and double check that basedir and datadir (in [mysqld] section) are pointing to the right location.



If they're correct, try recreating MySQL core structure using the following command:



sudo mysql_install_db –-user=mysql –ldata=/YOUR/datadir


If above won't help, please re-install your MAMP/mysql from scratch.






share|improve this answer


























  • I reinstalled MAMP. Works fine with default mysql-folder. Now, trying to enter: /Applications/MAMP/Library/bin/mysqladmin -u root -p password in terminal results in: "error: 'Can't connect to local MySQL server through socket ...'

    – user3789629
    Jan 13 '16 at 20:54













  • @user3789629 Check by mysql_config --socket where is your socket file and if it's correct (/Applications/MAMP/tmp/mysql/mysql.sock), otherwise update it in your my.cnf. See this post, it's Drupal focused, but still could help.

    – kenorb
    Jan 13 '16 at 21:01


















0














According to Troubleshooting a MySQL Installation Reference Manual (it's for Windows, but it should be the same for other systems), the error:




Fatal error: Can't open privilege tables: Table 'mysql.host' doesn't exist




can occur when the MySQL base or data directories are installed in different locations. This could happen when you upgraded and installed to a new location, but you're using old configuration file. If that's the case, be sure to rename any old configuration files when upgrading MySQL.



Otherwise please edit your my.ini and double check that basedir and datadir (in [mysqld] section) are pointing to the right location.



If they're correct, try recreating MySQL core structure using the following command:



sudo mysql_install_db –-user=mysql –ldata=/YOUR/datadir


If above won't help, please re-install your MAMP/mysql from scratch.






share|improve this answer


























  • I reinstalled MAMP. Works fine with default mysql-folder. Now, trying to enter: /Applications/MAMP/Library/bin/mysqladmin -u root -p password in terminal results in: "error: 'Can't connect to local MySQL server through socket ...'

    – user3789629
    Jan 13 '16 at 20:54













  • @user3789629 Check by mysql_config --socket where is your socket file and if it's correct (/Applications/MAMP/tmp/mysql/mysql.sock), otherwise update it in your my.cnf. See this post, it's Drupal focused, but still could help.

    – kenorb
    Jan 13 '16 at 21:01
















0












0








0







According to Troubleshooting a MySQL Installation Reference Manual (it's for Windows, but it should be the same for other systems), the error:




Fatal error: Can't open privilege tables: Table 'mysql.host' doesn't exist




can occur when the MySQL base or data directories are installed in different locations. This could happen when you upgraded and installed to a new location, but you're using old configuration file. If that's the case, be sure to rename any old configuration files when upgrading MySQL.



Otherwise please edit your my.ini and double check that basedir and datadir (in [mysqld] section) are pointing to the right location.



If they're correct, try recreating MySQL core structure using the following command:



sudo mysql_install_db –-user=mysql –ldata=/YOUR/datadir


If above won't help, please re-install your MAMP/mysql from scratch.






share|improve this answer















According to Troubleshooting a MySQL Installation Reference Manual (it's for Windows, but it should be the same for other systems), the error:




Fatal error: Can't open privilege tables: Table 'mysql.host' doesn't exist




can occur when the MySQL base or data directories are installed in different locations. This could happen when you upgraded and installed to a new location, but you're using old configuration file. If that's the case, be sure to rename any old configuration files when upgrading MySQL.



Otherwise please edit your my.ini and double check that basedir and datadir (in [mysqld] section) are pointing to the right location.



If they're correct, try recreating MySQL core structure using the following command:



sudo mysql_install_db –-user=mysql –ldata=/YOUR/datadir


If above won't help, please re-install your MAMP/mysql from scratch.







share|improve this answer














share|improve this answer



share|improve this answer








edited Jan 13 '16 at 20:17

























answered Jan 13 '16 at 20:07









kenorbkenorb

11.7k1580118




11.7k1580118













  • I reinstalled MAMP. Works fine with default mysql-folder. Now, trying to enter: /Applications/MAMP/Library/bin/mysqladmin -u root -p password in terminal results in: "error: 'Can't connect to local MySQL server through socket ...'

    – user3789629
    Jan 13 '16 at 20:54













  • @user3789629 Check by mysql_config --socket where is your socket file and if it's correct (/Applications/MAMP/tmp/mysql/mysql.sock), otherwise update it in your my.cnf. See this post, it's Drupal focused, but still could help.

    – kenorb
    Jan 13 '16 at 21:01





















  • I reinstalled MAMP. Works fine with default mysql-folder. Now, trying to enter: /Applications/MAMP/Library/bin/mysqladmin -u root -p password in terminal results in: "error: 'Can't connect to local MySQL server through socket ...'

    – user3789629
    Jan 13 '16 at 20:54













  • @user3789629 Check by mysql_config --socket where is your socket file and if it's correct (/Applications/MAMP/tmp/mysql/mysql.sock), otherwise update it in your my.cnf. See this post, it's Drupal focused, but still could help.

    – kenorb
    Jan 13 '16 at 21:01



















I reinstalled MAMP. Works fine with default mysql-folder. Now, trying to enter: /Applications/MAMP/Library/bin/mysqladmin -u root -p password in terminal results in: "error: 'Can't connect to local MySQL server through socket ...'

– user3789629
Jan 13 '16 at 20:54







I reinstalled MAMP. Works fine with default mysql-folder. Now, trying to enter: /Applications/MAMP/Library/bin/mysqladmin -u root -p password in terminal results in: "error: 'Can't connect to local MySQL server through socket ...'

– user3789629
Jan 13 '16 at 20:54















@user3789629 Check by mysql_config --socket where is your socket file and if it's correct (/Applications/MAMP/tmp/mysql/mysql.sock), otherwise update it in your my.cnf. See this post, it's Drupal focused, but still could help.

– kenorb
Jan 13 '16 at 21:01







@user3789629 Check by mysql_config --socket where is your socket file and if it's correct (/Applications/MAMP/tmp/mysql/mysql.sock), otherwise update it in your my.cnf. See this post, it's Drupal focused, but still could help.

– kenorb
Jan 13 '16 at 21:01




















draft saved

draft discarded




















































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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1025972%2fmysql-sock-missing-cant-connect-to-local-mysql-server-through-socket%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

Сан-Квентин

8-я гвардейская общевойсковая армия

Алькесар