Mongodb not working in windows 32bit [duplicate] - php
I am coming from riak and redis where I never had an issue with this services starting, or to interact.
This is a pervasive problem with mongo and am rather clueless. Restarting does not help.I am new to mongo.
mongo
MongoDB shell version: 2.2.1
connecting to: test
Fri Nov 9 16:44:06 Error: couldn't connect to server 127.0.0.1:27017 src/mongo/shell/mongo.js:91
exception: connect failed
This is what I see in the logs.
now open)
Fri Nov 9 16:44:34 [conn47] end connection 10.29.16.208:5306 (1 connection now open)
Fri Nov 9 16:45:04 [initandlisten] connection accepted from 10.29.16.208:5307 #48 (2 connections now open)
Fri Nov 9 16:45:04 [conn48] end connection 10.29.16.208:5307 (1 connection now open)
Fri Nov 9 16:45:04 [initandlisten] connection accepted from 10.29.16.208:5308 #49 (2 connections now open)
Fri Nov 9 16:45:04 [conn49] end connection 10.29.16.208:5308 (1 connection now open)
Fri Nov 9 16:45:34 [initandlisten] connection accepted from 10.29.16.208:5316 #50 (2 connections now open)
Fri Nov 9 16:45:34 [conn50] end connection 10.29.16.208:5316 (1 connection now open)
Fri Nov 9 16:45:34 [initandlisten] connection accepted from 10.29.16.208:5317 #51 (2 connections now open)
Fri Nov 9 16:45:34 [conn51] end connection 10.29.16.208:5317 (1 connection now open)
Fri Nov 9 16:46:04 [initandlisten] connection accepted from 10.29.16.208:5320 #52 (2 connections now open)
Fri Nov 9 16:46:04 [conn52] end connection 10.29.16.208:5320 (1 connection now open)
Fri Nov 9 16:46:04 [initandlisten] connection accepted from 10.29.16.208:5321 #53 (2 connections now open)
Fri Nov 9 16:46:04 [conn53] end connection 10.29.16.208:5321 (1 conn
Normally this caused because you didn't start mongod process before you try starting mongo shell.
Start mongod server
mongod
Open another terminal window
Start mongo shell
mongo
Resolved.
This problem could be solved by the below mentioned 4 steps
1) Remove .lock file
sudo rm /var/lib/mongodb/mongod.lock
2) repair the mongodb
mongod -–repair
3) start the mongod server
sudo service mongod start
4) start the mongo client
mongo
For more details take a look at http://shakthydoss.com/error-couldnt-connect-to-server-127-0-0-127017-srcmongoshellmongo-js-exception-connect-failed/
http://shakthydoss.com/technical/error-couldnt-connect-to-server-127-0-0-127017-srcmongoshellmongo-js-exception-connect-failed/
This method only works if you want to repair your data files without preserving the original files
To find where you dbpath resides- vim /etc/mongodb.conf
check for option dbpath=
(I have dbpath=/var/lib/mongodb)
Default: /data/db/
Typical locations include: /srv/mongodb, /var/lib/mongodb or /opt/mongodb .
Replace the /var/lib/mongodb with your dbpath
sudo rm /var/lib/mongodb/mongod.lock
sudo mongod --dbpath /var/lib/mongodb/ --repair
sudo mongod --dbpath /var/lib/mongodb/ --journal
(Make sure that you leave you terminal running in which you have run above lines,
dont press 'Ctrl+c' or quit it.)
Type the command to start mongo now in another window.
Hope this works for you !
for those who want to repair your data files while preserving the original files
mongo recover
This error is what you would see if the mongo shell was not able to talk to the mongod server.
This could be because the address was wrong (host or IP) or that it was not running. One thing to note is the log trace provided does not cover the "Fri Nov 9 16:44:06" of your mongo timestamp.
Can you:
Provide the command line arguments (if any) used to start your
mongod process
Provide the log file activity from the mongod startup as well as
logs during the mongo shell startup attempt?
Confirm that your mongod process is being started on the same
machine as the mongo shell?
I am a windows user and I installed MongoDB in November 2018 and I didn't wanted to setup data/db directories. But after few days, when I open, got an error message:
MongoDB shell version v4.0.4
connecting to: mongodb://127.0.0.1:27017
2018-12-05T20:42:40.108+0530 E QUERY [js] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: No connection could be made because the target machine actively refused it. :
connect#src/mongo/shell/mongo.js:257:13
#(connect):1:6
exception: connect failed
Then I tried to fix using all of above answers and didn't worked. When I tried to run mongod it said
MongoDB starting : pid=12220 port=27017 dbpath=C:\data\db\ 64-bit host=bla
I tried to change the db path(to program files) through file system and also using cmd but those didnot worked.
Solution that worked for me is:
Opened the Task Manager (ctrl + shift + esc) -> Services tab and there was a MongoDB row with the status stopped. Then I right clicked and clicked start and everything working perfectly :).
MAC OS
Check status
brew services list
Something like:
Name Status User Plist
mongodb stopped
start it
brew services start mongodb
Try it again
mongo or mongo --port 27017
Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: No connection could be made because the target machine actively refused it.
This error caused because Mongo Server been closed
Simple Follow these steps
Open Task Manager
Go to >Services
Find MongoDB
Right click and select Start
In my case:
First I open config file
sudo vi /etc/mongodb.conf
Comment IP and Port like this
#bind_ip = 127.0.0.1
#port = 27017
Then restart mongodb
sudo service mongodb restart
sudo service mongod restart
Finally, it's work :D
finn#Finn ~ $ mongo
MongoDB shell version: 2.4.9
connecting to: test
> exit
A little to late with the answer but I've encountered the same issue
Following are the steps which helped me.
Go to C:\
Create "data" folder
In "data" create "db" folder
open terminal (CMD) -> go to EX:"c:\MongoDB\Server\3.4\bin"
type in mongod => this will start mongo server (leave it opened)
Run using a GUI, EX "robomongo"
Or
open new terminal (CMD) -> go to EX:"c:\MongoDB\Server\3.4\bin"
type in "mongo" command
Make sure that your mongo is running.
I fixed this problem by trying to repair the mongodb, there I found that the directory required for the db to run was not created. It shows this error
Type: mongod, it will show the error
exception in initAndListen: 29 Data directory /data/db not found., terminating
Error happen because dbpath /data/db/ (default config) does not exist. You need to create data folder and set permission for it.
Then I create a folder on my system by the command
sudo mkdir -p /data/db/
and
sudo chown id -u /data/db
then I run the mongo again and it worked.
I face same issue after searching a lot I solve this by following :
sudo service mongodb stop
sudo rm /var/lib/mongodb/mongod.lock
sudo mongod --repair --dbpath /var/lib/mongodb
sudo mongod --fork --logpath /var/lib/mongodb/mongodb.log --dbpath /var/lib/mongodb
sudo service mongodb start
If all the above solution does not work: go to service (start>search>services) and start mongodb service. Then, in a cmd prompt, after going to bin, type :/>mongo
To connect with mongo we have to first start 'mongod' services.
following output you can see :
$ mongod
2017-03-05T00:31:39.055+0530 I CONTROL [initandlisten] MongoDB starting : pid=1481 port=27017 dbpath=/data/db 64-bit host=Prabhu-Nandans-Mac.local
2017-03-05T00:31:39.056+0530 I CONTROL [initandlisten] db version v3.4.2
2017-03-05T00:31:39.056+0530 I CONTROL [initandlisten] git version: 3f76e40c105fc223b3e5aac3e20dcd026b83b38b
2017-03-05T00:31:39.056+0530 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.2k 26 Jan 2017
2017-03-05T00:31:39.056+0530 I CONTROL [initandlisten] allocator: system
2017-03-05T00:31:39.056+0530 I CONTROL [initandlisten] modules: none
2017-03-05T00:31:39.056+0530 I CONTROL [initandlisten] build environment:
2017-03-05T00:31:39.056+0530 I CONTROL [initandlisten] distarch: x86_64
2017-03-05T00:31:39.056+0530 I CONTROL [initandlisten] target_arch: x86_64
2017-03-05T00:31:39.056+0530 I CONTROL [initandlisten] options: {}
2017-03-05T00:31:39.056+0530 W - [initandlisten] Detected unclean shutdown - /data/db/mongod.lock is not empty.
2017-03-05T00:31:39.057+0530 I - [initandlisten] Detected data files in /data/db created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
2017-03-05T00:31:39.057+0530 W STORAGE [initandlisten] Recovering data from the last clean checkpoint.
2017-03-05T00:31:39.057+0530 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=3584M,session_max=20000,eviction=(threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),
2017-03-05T00:31:39.620+0530 I CONTROL [initandlisten]
2017-03-05T00:31:39.620+0530 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database.
2017-03-05T00:31:39.620+0530 I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted.
2017-03-05T00:31:39.620+0530 I CONTROL [initandlisten]
2017-03-05T00:31:39.620+0530 I CONTROL [initandlisten]
2017-03-05T00:31:39.620+0530 I CONTROL [initandlisten] ** WARNING: soft rlimits too low. Number of files is 256, should be at least 1000
2017-03-05T00:31:39.643+0530 I FTDC [initandlisten] Initializing full-time diagnostic data capture with directory '/data/db/diagnostic.data'
2017-03-05T00:31:39.643+0530 I NETWORK [thread1] waiting for connections on port 27017
2017-03-05T00:31:40.008+0530 I FTDC [ftdc] Unclean full-time diagnostic data capture shutdown detected, found interim file, some metrics may have been lost. OK
2017-03-05T00:32:03.832+0530 I NETWORK [thread1] connection accepted from 127.0.0.1:49806 #1 (1 connection now open)
2017-03-05T00:32:03.833+0530 I NETWORK [conn1] received client metadata from 127.0.0.1:49806 conn1: { application: { name: "MongoDB Shell" }, driver: { name: "MongoDB Internal Client", version: "3.4.2" }, os: { type: "Darwin", name: "Mac OS X", architecture: "x86_64", version: "16.4.0" } }
2017-03-05T00:32:08.376+0530 I - [conn1] end connection 127.0.0.1:49806 (1 connection now open)
After that open another terminal and just type 'mongo'.
Following is output you can see :
$ mongo
MongoDB shell version v3.4.2
connecting to: mongodb://127.0.0.1:27017
MongoDB server version: 3.4.2
Your issue solved :)
I also have the same problem then I got fixed by these two lines of code. Hope, it helps
systemctl start mongod
systemctl enable mongod
Start monogdb service using
sudo service mongod start
then from the new window or terminal start mongo client using
mongo
After exhausting lots and lots of sulotions, I did-
sudo brew services start mongodb-community rather than
sudo service mongod start and it worked.
So, first try
sudo brew services start mongodb-community
and then to start the mongo shell, do-
mongo
FOR MACOS
Check the status of the services:
brew services
If you have something like:
Name Status
mongodb-community error
So you can just to stop and restart the service like this:
brew services stop mongodb-community
brew services start mongodb-community
This was happening with me today and I resolved it in following way.
Machine: I'm using Windows 10 machine and downloaded the latest MongoDB - Community edition.
So, the problem was, I did not have C:\data\db created.
Without creating C:\data\db, I opened CMD terminal and started the database using mongod command at terminal
C:\YourInstallationPath\bin>mongod
And when I fired mongo command then I was getting the problem.
Twist, I created the necessary folders but still was getting the problem. And this is because mongo server was already running. To fix it, I fired up mongod command again, and it automatically referenced to C:\data\db.
Other users have suggested to add C:\data\db but did not talk about executing mongod again, which exactly solved my problem.
I had same problem to connect mongodb after install using brew on macOS.
The problem was also mongod.lock but before i had mongodb 3.6 installed and database directory was /usr/local/var/mongodb and it have old files and mongod.lock
Simple i moved my old database files to different folder and removed everything from /usr/local/var/mongodb
Then restarted :
brew services restart mongodb
And it's working fine now.
I was getting this error on ubuntu but you can try with the following command:
sudo service mongod start
You can try with following command:
sudo service mongod start
in my case in windows and ubuntu, i needed to create /data/db folder in root. In ubuntu, i needed one additional option; to give permissions for directory.
windows
mkdir c:/data/db
ubuntu:
sudo mkdir -p /data/db
sudo chmod 700 /data/db
then run
sudo service mongod start
check
sudo service mongod status
and then run
mongo
Remove mongod.lock file. And run "mongod -repair". uninstall/reinstall mongod service fixed that problem for me.
Thanks.
Another solution that resolved this same error for me, though this one might only be if you are accessing mongo (locally) via a SSH connection via a virtual machine (at least that's my setup), and may be a linux specific environment variable issue:
export LC_ALL=C
Also, I have had more success running mongo as a daemon service then with sudo service start, my understanding is this uses command line arguments rather then the config file so it likely is an issue with my config file:
mongod --fork --logpath /var/log/mongodb.log --auth --port 27017 --dbpath /var/lib/mongodb/admin
Create the folder C:data/db if it doesn't already exist on your computer. Turns out MongoDB requires the existence of this folder structure 'data/db' to run. I hope this helps someone.
The cause by me was the space - run this in the console:
df -h
or more specifically:
du -hs /var/lib/mongodb/
to check he disk usage. If it's ~ 99% - just clean up some space and try again!
First, go to c:\mongodb\bin> to turn on mongoDB, if you see in console that mongo is listening in port 27017, it is OK
If not, close console and create folder c:\data\db and start mongod again
if all the solution above doesn't work out perhaps then this might be one to help. Somewhere down the line you may have made connection to your local mongodb database via vagrant boxes.
vagrant up and then ssh into your vagrant machine in which you've made connection with mongodb (vagrant ssh vagrant_box_name)
comment out the bind_ip line from /etc/mongod.conf using # (sudo nano /etc/mongod.conf )
restart your mongodb daemon service (sudo service mongod restart)
voila...
OK, this may be strange. My error happened because my log grew exponentially and clogged up server space hence mongo didn't get enough space to store anything.
so I cleared the log
> /var/log/mongod.log
When we take taskbar manager, go to Service tab. There MongoDB status shows the stopped. Right click for start. Its will connect MongoDB server version.
for checking type "db".
db
test
It will work fine.
Related
Best way to update PHP version on bedrock wordpress site
I updated the language of my question, because the original question seemed to be worded in a confusing way (evident from downvotes and unhelpful comments). Hope this makes more sense. Hi, I'm trying to upgrade the PHP version on a site, I followed this thread and it worked nicely on my development site - I basically changed all instance of PHP "7.1" in the trellis directory to "7.4", and required a PHP version of at least 7.4 in composer and ran composer update. I happily pushed the update to the staging site, but when I attempted to provision the server with ansible-playbook server.yml -e env=staging, I received the following error: TASK [Install Python 2.x] ************************************************************************************* *********************************** System info: Ansible 2.3.0.0; Linux Trellis at "Update PHP from 7.1 to 7.4" --------------------------------------------------- Shared connection to 107.170.41.149 closed. fatal: [107.170.41.149]: FAILED! => {"changed": false, "failed": true, "rc": 100, "stderr": "Shared connection to 107.170.41.149 closed.\r\n", "stdout": "/usr/bin/python\r\nE: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).\r\n", "stdout_lines": ["/usr/bin/python", "E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution)."]} Ansible seems to be getting stuck on the "Install Python 2." task. The staging server cannot be provisioned, and when I run php -v on the server it says it's running PHP 7.2. How do I update PHP? I am avoiding doing it manually, because my gut's telling me there's a special roots way. The server in question is Ubuntu 16.04 running PHP 7.2 (as mentioned above). Below is the verbose output of the error from provisioning the staging server: System info: Ansible 2.3.0.0; Linux Trellis at "Update PHP from 7.1 to 7.4" --------------------------------------------------- OpenSSH_7.6p1 Ubuntu-4, OpenSSL 1.0.2n 7 Dec 2017 debug1: Reading configuration data /home/jill/.ssh/config debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 19: Applying options for * debug1: auto-mux: Trying existing master debug2: fd 3 setting O_NONBLOCK debug2: mux_client_hello_exchange: master version 4 debug3: mux_client_forwards: request forwardings: 0 local, 0 remote debug3: mux_client_request_session: entering debug3: mux_client_request_alive: entering debug3: mux_client_request_alive: done pid = 16490 debug3: mux_client_request_session: session request sent debug1: mux_client_request_session: master session id: 2 debug3: mux_client_read_packet: read header failed: Broken pipe debug2: Received exit status from master 100 Shared connection to 107.170.41.149 closed. fatal: [107.170.41.149]: FAILED! => { "changed": false, "failed": true, "rc": 100, "stderr": "OpenSSH_7.6p1 Ubuntu-4, OpenSSL 1.0.2n 7 Dec 2017\r\ndebug1: Reading configuration data /home/jill/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 16490\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 100\r\nShared connection to 107.170.41.149 closed.\r\n", "stdout": "/usr/bin/python\r\nE: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).\r\n", "stdout_lines": [ "/usr/bin/python", "E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution)." ] }
This is neither a PHP composer nor a Python problem nor an Ansible problem. The underlying operating system (Ubuntu) has a problem with its apt libraries. The error comes from APT. Sadly you didn't tell us, what ansible module you use in the task named "Install Python 2.x". Try 'apt-get -f install' with no packages I think, some package installations hang on the system and need to be installed or configured. This may not have anything to do with your current job of upgrading PHP. Something went wrong in the past. APT will continue to stop operating til this issue is solved. Normally you would do it manually and have a look at the output of apt-get -f install to get an advice of what is the problem with that system. I think it will try to fix the issue automatically or throw an error what is the real issue (for example with two packages that cannot be installed at the same time or a file or directory that is missing or contains wrong values). This is nothing "normal" which should happen all the time, when you update 100 hosts. This is very specific and part of the so called "configuration gap". Of course -if you dont want to login manually- you can ignore that error in your playbook task, but register the result, if the task failes, check, if the error messages in the registered var contains the above message in stderr and call a command module in your playbook. This would be a little bit of "self-healing". Something like this - package: name: "..." ignore_errors: true register: installation - shell: "apt -f install" register: self_healing when: - "installation is failed" - "'apt -f install' in installation.stderr" - debug: var: self_healing when: "self_healing is defined"
MYSQL 8.0 - unsupported redo log format
I have recently updated mysql that was located under my xampp folder, and i've got the following errors, reporting from the log file : 2018-04-19T12:59:19.667059Z 0 [System] [MY-010116] [Server] C:\xampp\mysql\bin\mysqld.exe (mysqld 8.0.11) starting as process 9324 2018-04-19T12:59:20.025280Z 1 [ERROR] [MY-013090] [InnoDB] InnoDB: Unsupported redo log format (0). The redo log was created before MySQL 5.7.9 2018-04-19T12:59:20.026140Z 1 [ERROR] [MY-012930] [InnoDB] InnoDB: Plugin initialization aborted with error Generic error. 2018-04-19T12:59:20.229069Z 1 [ERROR] [MY-011013] [Server] Failed to initialize DD Storage Engine. 2018-04-19T12:59:20.230803Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2018-04-19T12:59:20.231371Z 0 [ERROR] [MY-010119] [Server] Aborting 2018-04-19T12:59:20.233136Z 0 [System] [MY-010910] [Server] C:\xampp\mysql\bin\mysqld.exe: Shutdown complete (mysqld 8.0.11) MySQL Community Server - GPL. I have been told if updating your mysql, you should comment out the deprecated configs that are located in your my.ini, but i had no idea what to comment out, so i left it as it is. Any idea what causes this?
If you have already installed MySQL and did not perform a slow shutdown using the innodb_fast_shutdown Flag, simply go to your MySQL directory /var/lib/mysql/ And remove the log files (Do not do this if you need the table data in your database until you have backed up your database): ib_logfile0 ib_logfile1 Back them up before if you need them again.
Docker users I faced with the same error while using dockerized mariaDB. The solution was: remove the docker image: docker image ls docker rmi imagename remove the volume: docker volume ls docker volume rm yourvolume remove the container: docker ps -a docker rm yourcontainer Then: docker-compose up Windows 10 Users Also in windows if you want to remove the log files as it was suggested earlier: The ib_logfiles are in C:\ProgramData\MySQL\MySQL Server x.x\Data
Mac OS X Users The ib_logfiles are here rm /usr/local/var/mysql/ib_logfile*
In my case, I have deleted the complete folder /var/lib/mysql and restarted the mysql service and it worked... rm -rf /var/lib/mysql Note: You may loose your data if you delete that folder
Couldn't connect to host, Elasticsearch down? 500 Internal Server Error - HttpException
I am working in my project in 2 different servers. The code is cloned from bitbucket so is exactly the same, but in one of them I get this error on every HTTP request: Couldn't connect to host, Elasticsearch down? 500 Internal Server Error - HttpException S.O. Ubuntu 16.04 When I run service elasticsearch status I get this: elasticsearch.service - LSB: Starts elasticsearch Loaded: loaded (/etc/init.d/elasticsearch; bad; vendor preset: enabled) Active: active (exited) since Sun 2017-01-15 11:05:25 CET; 1h 16min ago Docs: man:systemd-sysv-generator(8) Process: 1366 ExecStart=/etc/init.d/elasticsearch start (code=exited, status=0 Jan 15 11:05:25 ubuntu systemd[1]: Starting LSB: Starts elasticsearch... Jan 15 11:05:25 ubuntu systemd[1]: Started LSB: Starts elasticsearch. When I run fos:elastica:populate I got this error: [Elastica\Exception\Connection\HttpException] Couldn't connect to host, Elasticsearch down? And running curl -XGET http://127.0.0.1:9200 I get curl: (7) Failed to connect to 127.0.0.1 port 9200: Connection refused I was searching for 5 days and think this issue is something about permissions.
Thanks a lot #antonbormotov. I was searching about to start elasticsearch and found this response. It seems that to get Elasticsearch to run on 16.04 you have to set START_DAEMON to true on /etc/default/elasticsearch. It comes commented out by default, and uncommenting it makes Elasticsearch start again just fine. Be sure to use systemctl restart instead of just start because the service is started right after installation, and apparently there's some socket/pidfile/something that systemd keeps that must be released before being able to start the service again It's running now!
apache - additional mysql-installation without root
got some space at an intern SUSE Linux Enterprise Server 11 (x86_64) for the apache-webserver (apache 2.2.29, php 5.4.40) of our department. Our php is built with Oracle, not MySQL. I wanna install MySQL additionally but due to our very strict guidelines I only have permissions to write in my "/usd/[user]"-directory, not "/var/lib" etc. so there is no possibility to run the command "rpm -i MySQL-server-5.6.25-1.sles11.x86_64.rpm" or sth like that. user:/usd/as07100a/soft> rpm -i MySQL-server* error: can't create transaction lock on /var/lib/rpm/__db.000 user:/usd/as07100a/soft> touch /var/lib/rpm/__db.000 touch: cannot touch `/var/lib/rpm/__db.000': Permission denied Is there any known option I can install MySQL with my restricted permissions (e. g. kinda portable version)?
It seems that this is possible: Install MySql without root access Also see this post for additional configuration information: Mysql - specify socket location You will also likely need to change the port number in your configuration since OracleSQL is probably running on that port already. You can use netstat to see if any other program is listening on 3306. netstat -ntl
MySQL Database won't start in XAMPP Manager-osx
I downloaded XAMPP about a month ago and it was working just fine. Today I installed a voice recognition software and then restarted my computer. Ever since, MySQL won't start in my manager-osx application. It doesn't throw me an in the application log. This is what it says: Stopping all servers... Stopping Apache Web Server... /Applications/XAMPP/xamppfiles/apache2/scripts/ctl.sh : httpd stopped Stopping ProFTPD... Checking syntax of configuration file /Applications/XAMPP/xamppfiles/proftpd/scripts/ctl.sh : proftpd stopped Restarting all servers... Starting MySQL Database... Starting Apache Web Server... /Applications/XAMPP/xamppfiles/apache2/scripts/ctl.sh : httpd started Starting ProFTPD... Checking syntax of configuration file /Applications/XAMPP/xamppfiles/proftpd/scripts/ctl.sh : proftpd started Both my ProFTPD and my Apache Web Server are running. MySQL isn't. When I go to phpmyadmin, it throws me this error message. #2002 - No such file or directory The server is not responding (or the local server's socket is not correctly configured). Please help me. I have no idea what to do. UPDATE: After looking around the internet a bit, I found a similar problem a user had with MAMP, another user recommended killing the mysql process, what ever that means. Could this be a fix to my problem? UPDATE 2: I found the answer to my problem but I can't answer it yet. So here's the answer: 1) Open terminal and type sudo su and then put in your password 2) Then type ps aux | grep mysql (just copy and paste this) 3) You will need to get the process id of mysql. There should be number near the top, something like 739 or 8827 4) Kill the process using kill -9 {process id} this should look something like this: kill -9 739 5) Restart MySQL in manager-osx
This should work: sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start
Minimal Guide 1. sudo killall mysqld 2. manager-osx > start mysql If that didn't work... sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start Google the error... Examples: Error: ERROR! The server quit without updating PID file (/Applications/XAMPP/xamppfiles/var/mysql/<computername>.local.pid) My Solution: In /Applications/XAMPP/xamppfiles/etc/my.cnf change user = <uid> s that <uid> is uid from id command. $ id uid=... $ vim /Applications/XAMPP/xamppfiles/etc/my.cnf ...
If these commands don't work for you: sudo killall mysqld sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start Try this: For XAMPP 7.1.1-0, I changed the port number from 3306 to 3307. Click on Manage Servers Select MySQL Database Click on Configure on your right Change your port number to 3307 Click OK Close your Control Panel and relaunch it. You are now good to go.
check the err log on your /Applications/XAMPP/xamppfiles/var/mysql/ with filename like your_machine_name.local.err, if you find something like: "Attempted to open a previously opened tablespace. Previous tablespace ... uses space ID" the following works for me: edit file: /Applications/XAMPP/xamppfiles/etc/my.cnf find the [mysqld] section, add one line: innodb_force_recovery = 1 then run sudo /Applications/XAMPP/bin/mysql.server start everything is ok again. and then the last step: edit the my.cnf again and remove the line you just added : innodb_force_recovery = 1 and restart mysql again. Otherwise all your tables will be read only
Try running these two commands in the terminal: sudo killall mysqld sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start
For me the following worked: Change permission into 'read only' for 'everyone' to the file /Applications/XAMPP/xamppfiles/etc/my.cnf. Then start MySQL from XAMPP manager.
close XAMPP control sudo killall mysqld sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start
it happened to me. and sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start not work for me. so, i reinstall the xampp, then fix it. attention: reinstall the xampp, will not delete mysql data, no need to worry about that.
I first couldn't manage to kill mysql daemon with the commands posted here. So I remembered my linux times and did the following: I monitored the running processes by running top in one terminal window. Then I killed mysqld via sudo killall mysqld (screw the PID ;-) ) in another and restarted via sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start.
There's been a lot of answer, but I think I found what is causing it, at least for me. It looks like if you put your computer to sleep (or it falls asleep on its own), when it reopens, it tries to open the the mysql process again. At one point I looked at my activity monitor and I had 5 instances running - killing all of them and then starting mysql works.
sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start This worked for me.
I had success with easy killing all active mysql processes in Monitor Activity tool: 1) close XAMPP control 2) open Monitor Activity 3) select filter for All processes (default is My processes) 4) search for: mysql 5) force quit all the mysql 6) relaunch XAMPP control and launch apache again Enjoy
try these two line from terminal sudo killall mysqld sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start
on macOs High Sierra if mysql is not getting started from manager- oxs and have tried direct command i.e sudo /Applications/XAMPP/bin/mysql.server start too than go to path edit /Applications/XAMPP/xamppfiles/etc/ find file : my.cnf edit it under the [mysqld] section, add following line: innodb_force_recovery = 1 after it save and run or can be done from manager-osx sudo /Applications/XAMPP/bin/mysql.server start it should start the mysql. once its run you need to again edit the my.cnf file and remove the line just added innodb_force_recovery = 1 stop and start mysql again. by command sudo /Applications/XAMPP/bin/mysql.server start or by manager-osx it will be working fine.
It can cause because of the software you installed or may be any other software which is using the same port 3306. This 3306 port is used by the Mysql in XAMPP. Similar kind of problem I faced for Apache. I was running skype and trying to run the XAMPP but the skype uses the same port as Apache so it was not working. Then I sign out from skype then the port was free and the apache started. So you should look for the software in you laptop which is blocking or making busy this port. Free that port by closing the software and then run XAMPP and It will work.
What I did was the following: In XAMPP Control Panel I edited the my.ini file of configuration of MySql and changed the port from 3306 to 3307 and it worked, hope it helped! Edit: after you save this changes be sure that the service is off and then restart the service. I had this same problem when I installed MySQL, it's just the port.
I encountered this problem just now. I checked log file and found it is caused by the server was not shutdown correctly. So I found this http://rivenlinux.info/how-to-recover-innodb-corruption-for-mysql/ and add a simple configuration "innodb_force_recovery = 1" in [mysqld] in my.cnf. Then the problem was solved. The log file is located /Applications/XAMPP/xamppfiles/var/mysql and it named accroding to your server name. Just link this XXX-MacBook-Pro.local.err
All the answers stated above in relation to changing the port number are in this situation the best way to solve this problem since you need your voice recognition software to coexist with MAMP. However, you must remember that changing this port number is going to affect all you subsequent connections to MySQL (i.e, terminal,php code,phpmyadmin,etc). Hence It would be advisable to change the port on which the voice recognition software runs. Hope this was helpful. :)
if you are getting this error .............ERROR! The server quit without updating PID file Try this Go to /Applications/XAMPP/xamppfiles/var/mysql/ if there is no file with the name Your_Username.local.pid Your_Username should replace with your Mac Username Create a file with this name Then try sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start its worked for me
It had the same problem, all I did was give read-only permissions for ALL users (system included) and all items included in the following folders: /Applications/XAMPP/xamppfiles/etc /Applications/XAMPP/xamppfiles/sbin and relaunch XAMPP control and launch mysql server again or sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start
I have same problem and get this error in hostname.err in directory /Applications/XAMPP/xamppfiles/var/mysql 2016-09-06 15:32:45 140735322399488 [Note] Plugin 'FEEDBACK' is disabled. 2016-09-06 15:32:45 140735322399488 [Note] Heuristic crash recovery mode 2016-09-06 15:32:45 140735322399488 [Note] Please restart mysqld without --tc-heuristic-recover 2016-09-06 15:32:45 140735322399488 [ERROR] Can't init tc log 2016-09-06 15:32:45 140735322399488 [ERROR] Aborting 2016-09-06 15:32:48 20004 mysqld_safe mysqld from pid file /Applications/XAMPP/xamppfiles/var/mysql/hostname.pid ended Then I removed tc.log and It works fine after restart mysql through manager-osx
This could be due to the fact that another instance of mysqd is already running in your mac-book-pro (MacOs-10). It's next to impossible to kill/pkill mysqld or ....I tried that route many times, with out any success. Finally the following worked for me : launchctl unload -w /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist wait a few minutes and check with ps -ef|grep mysqld It should be gone!
It might be the possibility that your voice recognition software has a installer of mysql internally and when u installed this software, it has installed mysql too and added it to the service and this mysql service starts once your system starts. So now u r having two mysql servers (one from voice recognition software and second is from XAMPP) that's why killing the previous process (mysql service) solved your problem. But this is not a permanent solution, you have to repeat it every time when ever you start your machine. So better is to find out that mysql server (service) and change its port no. OR change settings so that mysql service should not start when your machine start (but might be your voice recognition software won't work properly) I hope it will help you. Cheers
You seem to have found a work-around by killing the process, but make sure you check for free space on your MySQL partition. If your logs or db files are consuming all your drive space, mysqld will not start.
Restarting the computer, or using the 'kill' commands listed above solve the problem. AS for preventing it from happening, I've found this occurring anytime my computer goes to sleep. The port is obviously kept reserved, and then on wake, mysql tries to reconnect to that port, but can't. This could be your problem also.
I am running XAMPP 5.6.3-0 for OS X Yosemite 10.10.2 and ran into the same issue twice, the first time was with Mavericks. With a bunch of different solutions to the issue with MySQL Database not starting using Manager App I wanted to confirm what had worked for me. The workaround that always worked and forced MySQL to start was by opening Terminal and using: sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start I had the Manager App open and started ProFTPD and Apache and then ran the sudo command. The other suggestion by wishap that worked was to locate /Applications/XAMPP/xamppfiles/etc/my.cnf file and change the permissions for "everyone" to Read only. The other problem I had that seems to be another issue with many solutions is the problem after everything is started then entering localhost which brings me to the xampp splash screen and then nothing. The only thing that worked for me, to at the very least, to access the phpMyAdmin page is by entering localhost/phpmyadmin I hope this helps others reading through a bunch of threads for an answer. Regards, Erik
Try this, sudo service mysql stop it will stop any other mysql services and then restart xampp
Just Click on Managed Servers Tab in XAMPP MANAGER , Now select MySQL Database, Click on configure on right side. Change port from 3306 to 3307 and it will work.
It had the same problem, all I did was give read-only permissions for all users and all items included in the following folders: /Applications/XAMPP/xamppfiles/etc /Applications/XAMPP/xamppfiles/sbin
Well, sometime there is just ERROR! message is shown in mysql comment on terminal. Then, just reinstall (overwrite) XAMPP, then it can be solved.