Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

185
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda