ProblemYou wish there was a way to type database and table names more quickly. SolutionThere is: use mysql's name auto-completion facility. DiscussionNormally, when you use mysql interactively, it reads the list of database names and the names of the tables and columns in your default (current) database when it starts up. mysql remembers this information to provide name-completion capabilities that are useful for entering statements with fewer keystrokes:
mysql's name auto-completion capability is based on the table names in the default database, and thus is not available within a mysql session until you select a database, either on the command line or with a USE statement. Auto-completion enables you to cut down the amount of typing you do. However, if you don't use this feature, reading name-completion information from the MySQL server may be counterproductive because it can cause mysql to start more slowly when you have a lot of tables in your database. To tell mysql not to read this information so that it starts up more quickly, specify the -A (or --skip-auto-rehash) option on the mysql command line. Alternatively, put a skip-auto-rehash line in the [mysql] group of your MySQL option file: [mysql] skip-auto-rehash To force mysql to read name completion information even if it was invoked in no-completion mode, issue a REHASH or \# command at the mysql> prompt. |