mirror of
https://github.com/OpenFusionProject/scripts.git
synced 2024-11-22 14:10:04 +00:00
Compare commits
No commits in common. "4196766a2b36478db0b5872cf4e892afd2117c00" and "5bf1ce01e32c8612f3767cec2df346095dd9f6d3" have entirely different histories.
4196766a2b
...
5bf1ce01e3
@ -4,7 +4,6 @@ version: '3.1'
|
||||
services:
|
||||
db:
|
||||
image: mysql:5.5.42
|
||||
command: --character-set-server utf8
|
||||
restart: always
|
||||
ports:
|
||||
- 3306:3306
|
||||
|
@ -179,7 +179,6 @@ def main(conn, xdt_path):
|
||||
for table_name in root:
|
||||
if "Table" in table_name:
|
||||
process_xdt_table(cursor, root, table_name, mappings)
|
||||
finalize(cursor)
|
||||
conn.commit()
|
||||
|
||||
def connect_to_db():
|
||||
@ -193,18 +192,10 @@ def connect_to_db():
|
||||
def prep_db():
|
||||
conn = connect_to_db()
|
||||
cursor = conn.cursor()
|
||||
# we have to upload a lot of data, so we need to raise the limit
|
||||
cursor.execute("SET GLOBAL max_allowed_packet=1073741824")
|
||||
conn.commit()
|
||||
conn.close()
|
||||
|
||||
def finalize(cursor):
|
||||
# credentials used by the game
|
||||
cursor.execute("GRANT SELECT ON XDB.* TO 'cmog' IDENTIFIED BY 'scooby'")
|
||||
# change the root password to something more secure
|
||||
new_root_pw = input("Enter new root password: ")
|
||||
cursor.execute(f"SET PASSWORD = PASSWORD('{new_root_pw}')")
|
||||
|
||||
# %%
|
||||
if __name__ == "__main__":
|
||||
if len(sys.argv) != 2:
|
||||
|
Loading…
Reference in New Issue
Block a user