Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

175
Views
Is there a way to reset all configuration in MySQL?

I need your help again.

Is there a way to reset all configuration in MySQL?

Here's what happened. I previously have a project installed and this time I'm setting up a new one.

In this new project, I wanted to set it up with my a new database, new username I created and password. However, when I reached the point where I had to execute php artisan migrate, it keeps throwing me an error saying PDOException::("SQLSTATE[HY000] [2002] No such file or directory")

If not that error, it's throwing connection refused instead.

Note: I'm using laradock.

Now, I'm at the point where I'd just rather reset the whole MySQL because I'm thinking it's conflicting with my previous configuration with my previous project.

As I searched online, I've tried the following: 1. Restarted server 2. Changed db_host from 127.0.0.1 to localhost and vice-versa 3. Added the project's directory to the dev environment setting 4. Docker-compose down and then up again 5. Even uninstalled and reinstalled docker itself

DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=newdbname
DB_USERNAME=newusername
DB_PASSWORD=newpassword!

All I want is to be able to execute php artisan migrate using the new credentials I set.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

If you really do not need any old data in database, you can just delete them & reset up a container:

# stop mysql service
docker-compose stop mysql

# delete old mysql database
rm -rf ~/.laradock/data/mysql

# resetup mysql container
docker-compose up -d nginx mysql

You can get the mysql database location according to docker-compose.yml & env-example:

docker-compose.yml:

volumes:
    - ${DATA_PATH_HOST}/mysql:/var/lib/mysql

env-example:

DATA_PATH_HOST=~/.laradock/data
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!