Giter Site home page Giter Site logo

DB MySQL about essentials HOT 12 CLOSED

44wrw44 avatar 44wrw44 commented on June 20, 2024
DB MySQL

from essentials.

Comments (12)

Kieaer avatar Kieaer commented on June 20, 2024

My mistake. no write how to create DB :(
you need create essentials database

execute this SQL to mysql command-line
CREATE DATABASE essentials

from essentials.

44wrw44 avatar 44wrw44 commented on June 20, 2024

As a result, I get an error, although everything has been created and I can easily connect to the database.

[02-25-2024 06:35:39] [I] [Essentials] Loading
java.sql.SQLException: No suitable driver found for jdbc:mysql://127.0.0.1:3306/essentials
        at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:708)
        at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:230)
        at org.jetbrains.exposed.sql.Database$Companion$connect$8.invoke(Database.kt:278)
        at org.jetbrains.exposed.sql.Database$Companion$connect$8.invoke(Database.kt:274)
        at org.jetbrains.exposed.sql.Database$Companion$doConnect$3.invoke(Database.kt:165)
        at org.jetbrains.exposed.sql.Database$Companion$doConnect$3.invoke(Database.kt:166)
        at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManager$ThreadLocalTransaction$connectionLazy$1.invoke(ThreadLocalTransactionManager.kt:120)
        at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManager$ThreadLocalTransaction$connectionLazy$1.invoke(ThreadLocalTransactionManager.kt:119)
        at kotlin.UnsafeLazyImpl.getValue(Lazy.kt:81)
        at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManager$ThreadLocalTransaction.getConnection(ThreadLocalTransactionManager.kt:145)
        at org.jetbrains.exposed.sql.Transaction.getConnection(Transaction.kt)
        at essentials.DB$open$2.invoke(DB.kt:61)
        at essentials.DB$open$2.invoke(DB.kt:61)
        at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.inTopLevelTransaction$run(ThreadLocalTransactionManager.kt:306)
        at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.access$inTopLevelTransaction$run(ThreadLocalTransactionManager.kt:1)
        at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt$inTopLevelTransaction$1.invoke(ThreadLocalTransactionManager.kt:353)
        at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.keepAndRestoreTransactionRefAfterRun(ThreadLocalTransactionManager.kt:361)
        at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.inTopLevelTransaction(ThreadLocalTransactionManager.kt:352)
        at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt$transaction$1.invoke(ThreadLocalTransactionManager.kt:261)
        at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.keepAndRestoreTransactionRefAfterRun(ThreadLocalTransactionManager.kt:361)
        at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.transaction(ThreadLocalTransactionManager.kt:231)
        at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.transaction(ThreadLocalTransactionManager.kt:209)
        at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.transaction$default(ThreadLocalTransactionManager.kt:208)
        at essentials.DB.open(DB.kt:61)
        at essentials.Main.<init>(Main.kt:51)
        at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)
        at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502)
        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:486)
        at mindustry.mod.Mods.loadMod(Mods.java:971)
        at mindustry.mod.Mods.load(Mods.java:465)
        at mindustry.Vars.init(Vars.java:337)
        at mindustry.server.ServerLauncher.init(ServerLauncher.java:48)
        at arc.backend.headless.HeadlessApplication.mainLoop(HeadlessApplication.java:64)
        at arc.backend.headless.HeadlessApplication$1.run(HeadlessApplication.java:52)

from essentials.

44wrw44 avatar 44wrw44 commented on June 20, 2024

image
Shouldn't it change the driver request to com.mysql.jdbc.Driver?

from essentials.

Kieaer avatar Kieaer commented on June 20, 2024

My bad 😇
I'll fix it within an hour

from essentials.

Kieaer avatar Kieaer commented on June 20, 2024

https://github.com/Kieaer/Essentials/releases/tag/v19.1

from essentials.

44wrw44 avatar 44wrw44 commented on June 20, 2024

image
The problem is not solved, now it connects to the local db according to the standard, but the external db is specified in the config.

from essentials.

Kieaer avatar Kieaer commented on June 20, 2024

@44wrw44 You need give "create" command permission to [email protected] account.
Use GRANT PRIVILEGE ON essentials.* TO 'wrw'@'192.168.0.111' command to mysql command line.
And apply permission to use this command - FLUSH PRIVILEGES;

from essentials.

44wrw44 avatar 44wrw44 commented on June 20, 2024

He has been issued rights *.*

from essentials.

Kieaer avatar Kieaer commented on June 20, 2024

@44wrw44 Can you upload this command result?
show grants for wrw@'192.168.0.111'

from essentials.

44wrw44 avatar 44wrw44 commented on June 20, 2024

image

from essentials.

44wrw44 avatar 44wrw44 commented on June 20, 2024

Found a problem, FireWall was blocking access to LAN through an isolated zone

from essentials.

Kieaer avatar Kieaer commented on June 20, 2024

If you have any other bugs or inquiries, feel free to come 🙂

from essentials.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.