For the past several versions of MySQL (and MariaDB), it only accepts connections on 127.0.0.1 by default, so, the networking hole isn't super-huge. Leave it on if you need it.johneee":3t4eg8lc said:As an item of clarification: If the TCP connections to the DB is shut off, I can no longer use the MySQL Workbench tools from my local development machine yes?
Any kind of tricky things to suggest so that I could still use that and still be safe?
I'll be talking through using a single DB user for each web app (like, one DB user for the forum software, one DB user for wordpress, and so on), but not any more granular than that. All of the web apps I'm planning on discussing don't appear to offer a way to use more than a single account, so I'm not sure if it's possible for mainstream stuff to get more granular, though I'd love to hear more detail about how and what you're doing.danstl":31iz3pne said:A lot of people have a single login to access the db that has full access to the db in question even for just displaying content on a page. I like to have different levels of access setup so most page operations only have access to what they need to - this helps mitigate any injection issues that you may have because of poor data validation techniques. For instance 99% of the site is read only, and only to certain portions of the db. (IE only login portions of the site can actually be compromised to gain access to user tables, etc..).
I have seen so many CMS sites where a simple injection attack from a user upload section can pull user login tables, etc...
Just remember the most secure server is one that is not online![]()
If it's on a remote machine, you could use an SSH tunnel to access it.johneee":24fjxb3i said:As an item of clarification: If the TCP connections to the DB is shut off, I can no longer use the MySQL Workbench tools from my local development machine yes?
Any kind of tricky things to suggest so that I could still use that and still be safe?
johneee":16r02a75 said:As an item of clarification: If the TCP connections to the DB is shut off, I can no longer use the MySQL Workbench tools from my local development machine yes?
Any kind of tricky things to suggest so that I could still use that and still be safe?
default_storage_engine=InnoDB
innodb_buffer_pool_size = 3G
mysqldump --single-transaction <database_name> | gzip -c > /tmp/$(date '+%Y-%m-%d')_backup.dump.gz
DougHW":1dwil655 said:MariaDB is a very interesting project, but I think it's a bit flippant to recommend such a small project without weighing the community base. Especially when you've just dismissed the entire world of NoSQL for being too fringe.
I've found offloading compression and writing to another host super helpful if your server is seeing lots of use during the backup. innobackupex is also a great solution for larger databases, and you can similarly offload compression/writing to another host with it.falcolas":3ccu0f2n said:Non-performance related - SET UP A BACKUP! MySQL comes with a decent tool for doing logical database backups - mysqldump. It will work fine until your database is in the multi-gigabyte size, at which point you're beyond this guide anyways.
Code:mysqldump --single-transaction <database_name> | gzip -c > /tmp/$(date '+%Y-%m-%d')_backup.dump.gz
mysqldump ... | ssh user@host 'tar -cvzf backup.tar.gz -'
Krutawn":1921dwq3 said:I tried making a web server on and old G4 Mac Mini but the incompatibilities with a lot of the "recommended" Linux web-hosting tools and a PPC slowed me down to where I couldn't this summer.
falcolas":dhcrc6bl said:Code:mysqldump --single-transaction <database_name> | gzip -c > /tmp/$(date '+%Y-%m-%d')_backup.dump.gz
romanlevin":kaqcn0aq said:I'm having trouble with SQL Buddy. Getting an error when trying to log in: "There was a problem logging you in." Don't get any errors in nginx's error.log, nor anywhere else I know to check. Using the correct username and password, as check by running mysql -u username -p. Any ideas what I'm doing wrong?
Decade":1w6vnjzs said:Krutawn":1w6vnjzs said:I tried making a web server on and old G4 Mac Mini but the incompatibilities with a lot of the "recommended" Linux web-hosting tools and a PPC slowed me down to where I couldn't this summer.
Well, you could start by running Ubuntu Server on that thing. There's a community-supported port.
One major caveat is that no third-party software is compiled for PowerPC. So, when guides tell you to add third-party repositories and download programs from them, you have to add the source repositories and run apt-build on them. It's slower, it works only with programs that include source, and the programs have to be well-written to be portable across processor architectures.
If you want to support 4-byte unicode characters (including emoji) you need to use utf8mb4. MySQL is in a special class of software where utf-8 is not actually utf-8!PietjePuk75":fko2z4aq said:[mysqld]
character_set_server=utf8
collation_server=utf8_unicode_ci
skip-character-set-client-handshake
Thanks for the info!leedo":3f850kd1 said:If you want to support 4-byte unicode characters (including emoji) you need to use utf8mb4. MySQL is in a special class of software where utf-8 is not actually utf-8!
Honestly not entirely sure. I just learned this recently when our forums were unable to insert emoji. A little online reading indicates that utf8mb4 shrinks the max InnoDB index length by quite a bit, so there could definitely be some downsides.PietjePuk75":344tel5y said:Thanks for the info!leedo":344tel5y said:If you want to support 4-byte unicode characters (including emoji) you need to use utf8mb4. MySQL is in a special class of software where utf-8 is not actually utf-8!
Does replacing utf8 with utf8mb4 and utf8_unicode_ci with utf8mb4_unicode_ci do the trick?
Any downsides (apart from disk usage)?
Still, some unicode is better then none ;-)