Quantcast
Channel: alvinalexander.com - mysql
Browsing latest articles
Browse All 28 View Live

MySQL show status - show open database connections

MySQL "show status" FAQ: Can you demonstrate how to use the MySQL show status command to show MySQL variables and MySQL status information, such as the number of open MySQL connections?I don't have a...

View Article


MySQL syntax examples - create table, primary key, foreign key

Just a quick note here today that if you need some example MySQL database tables, you can use these. I created them for some experiments I ran last night. They show the MySQL create table, primary key,...

View Article


mysqldump error: 1044: Access denied for user ... when using LOCK TABLES

A quick note on a MySQL error: I got the following error when using mysqldump this past weekend:mysqldump: Got error: 1044: Access denied for user 'USER'@'localhost' to database 'DBNAME' when using...

View Article

Image may be NSFW.
Clik here to view.

The MySQL Sakila sample database

The MySQL “Sakila” sample database can be helpful when you want to test a new application framework, or write a blog post, or book.

View Article

A Play Framework Anorm insert method that returns the database auto-insert ID

As a quick example, if you need to see some code for a Play FrameworkAnorm method that inserts an object into a relational database table and returns the auto-into (MySQL auto_increment) ID field on...

View Article


How to convert from a Scala BigDecimal to Java BigDecimal

Scala FAQ: How do I convert from a Scala BigDecimal instance to a Java BigDecimal?Call the bigDecimal method on your Scala BigDecimal instance, as shown in this example in the REPL:scala> val sb =...

View Article

The Play Framework, MySQL, currency, decimal fields, and BigDecimal types

I’m currently working on a Play Framework server-side application that handles money/currency. (The application UI uses Sencha ExtJS, but that doesn’t matter for this example.)From past experience I...

View Article

Complete backup scripts for my websites (Drupal, MySQL)

I’m spending a little time today trying to automate the process of backing up my websites, and in doing so I thought I would share the Linux shell scripts that I use to generate the backup files,...

View Article


How to connect to a MySQL database with Scala and JDBC

This is an excerpt from the Scala Cookbook (partially modified for the internet). This is Recipe 16.1, “How to connect to a MySQL database with Scala and JDBC.”ProblemYou want to connect to a MySQL...

View Article


Scala: How to connect to a SQL database with the Spring Framework

This is an excerpt from the Scala Cookbook (partially modified for the internet). This is Recipe 16.2, “How to connect to a database with the Spring Framework.”ProblemYou want to connect to a database...

View Article

How to use a my.cnf configuration file with MAMP/MySQL

I don’t know why, but I was unable to get MySQL under MAMP 3.5 to read a my.cnf configuration file. I put that file in all of the usual places, but it wasn’t read. Then I tried to get it to read my...

View Article

How to search for a string in all fields of every table in a MySQL database

This is pretty cool, if you want to search for a text string in all fields of all tables of a MySQL database, you can use phpMyAdmin to do this very easily. Here are the steps.1) Select the desired...

View Article

How to list MySQL database table column names without the table formatting

If you want to list all of the MySQL database table column names (field names) as a simple list of names, with each column name listed on a separate line, just follow these steps.First, start MySQL...

View Article


How to find all MySQL database tables that have specific column names

MySQL FAQ: How can I find all MySQL database tables that have specific column names?I found the solution on this SO page. Here’s my take on it.First, assuming that you want to copy and paste those...

View Article

A Drupal 8 XML Sitemap generating PHP script

I’m not going to comment on the following code too much or provide support for it, but (a) if you need to create an XML Sitemap for a Drupal 8 website, and (b) you don’t like the Drupal 8 sitemap...

View Article

Browsing latest articles
Browse All 28 View Live